-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using batch normalization in a nested model causes an error, resulting model is unloadable #4638
Comments
Stack trace:
|
Cannot reproduce. From which are conclude that some of your bullet points are incorrectly checked. |
The second bullet is correct because Im not using Theano, as obvious from the stack trace. ( "if A then B" implies "if not A then always true") |
update log --- am I wrong? its already 1.1.2.
|
Perhaps you missed line https://gist.github.com/guicho271828/5ac82dda5e5b12316ea705c7dc5a8aea#file-minimal-py-L16 ?
|
As I said, your code runs fine. Upgrade Keras, as specified in the issue
submission instructions.
…On 8 December 2016 at 04:55, Masataro Asai ***@***.***> wrote:
Perhaps you missed line https://gist.github.com/guicho271828/
5ac82dda5e5b12316ea705c7dc5a8aea#file-minimal-py-L16 ?
### uncommenting the lines below make it stop working
### just wrap it
# x = Input(shape=(784,))
# y = autoencoder1(x)
# autoencoder2 = Model(input=x,output=y)
# autoencoder = autoencoder2
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#4638 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArWbzVIeWVzAYor0Cj0fIVbn1aJMmPAks5rF_41gaJpZM4LHV9V>
.
|
The comment above verifies that the keras version is fine (keras 1.1.2 installed from github).
ok, I will clone keras locally and use it without pip and test it again. |
I locally cloned the keras git repository and still reproduces the same error (with above code uncommented).
|
The error is from tensorflow. As noted, Im using tensorflow-gpu 0.12 with python 2.7. |
more info:
|
Same issue here calling the model on a tf.Tensor. Keras is up to date, TF 0.12, Python 2.7 |
@guicho271828 In case this is blocking for you use |
@sebastian-schlecht thanks. |
reuse_variables works only in a certain occasion, and I am virtually unable to save/load models including BN due to similar errors. there is clearly something wrong regarding the BN naming scheme (e.g. "batchnormalization_1_running_mean/biased") |
I updated the gist https://gist.github.com/guicho271828/5ac82dda5e5b12316ea705c7dc5a8aea , |
@fchollet , I removed the latest Tensorflow and installed the older version (0.11). Then the failure case ran successfully. This is a regression due to the latest Tensorflow. I guess you have an older version. |
minimal test case:
https://gist.github.com/guicho271828/5ac82dda5e5b12316ea705c7dc5a8aea
tested under tensorflow backend. with version 0.12.
Please make sure that the boxes below are checked before you submit your issue. Thank you!
Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps
If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).
The text was updated successfully, but these errors were encountered: