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
Combining 2 models with batch normalizaton #5221
Comments
Do you have a minimal script to reproduce? Can't tell based on your description. Cheers |
Of course. Start with this, and I will try and see if I can make a smaller example. Thanks EDIT: I have updated the description with a code example |
@stepjam Your code block works for me in theano. I can try it out in tensorflow instead. What is your backend and what version of everything are you using? On the note of GANs, I put together this module for making a combined GAN model. It lets you train/test both the generator and the discriminator in a single fit/train_on_batch/evaluate/etc. Please let me know if it works for you, and if it doesn't, please let me know what is missing. |
OK. Replicated on tensorflow current stable release. I got a similar error on my other computer using theano but it went away when I updated theano. Not sure if it is happening in tensorflow bleeding edge. |
So the issue is that If you Other fix would probably just be to use mode=1 or 2 instead of 0 (default). The solution in |
@bstriner - Thanks for looking into this! OK great, thanks for finding the problem. I'll also have a look at your |
No problem. If you come up with anything cool in |
Also, there's some similar issue with Batch Normalization Layer in this question, which uses sequential mode: http://stackoverflow.com/questions/42422646/keras-train-partial-model-issue-about-gan-model |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. |
Hi,
There seems to be a problem when you combine 2 models (sub-models) that use batch normalization into another model (master-model), and then try and train one of the sub-models. When removing the batch normalization, it works as expected.
Below is a code snipped to reproduce.
When you run the example, you should see:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'combined_input' with dtype float
Thank you in advanced.
The text was updated successfully, but these errors were encountered: