-
Notifications
You must be signed in to change notification settings - Fork 177
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
Upgrade to Keras2? #12
Comments
I was stuck with your same problem. I ended up developing a batchnorm version that uses always batchnorm mode = 2. you can easily edit the keras file where bn is defined, and you can modify it so it will never use batchnorm training accumulated statistics. |
Can you share the code. @engharat Please. |
Sure. Here is a link to the code: https://drive.google.com/open?id=0B0E8DCU-EnYRR2l3aV9oTkJORHc . The file needs to be put in the same folder of your script and it needs to be imported of course, then you can substitute any occurrence of BatchNormalization layer in the generator / discriminator code with the layer BatchNormGAN. Or if you prefer the code: `# -- coding: utf-8 -- from keras.engine import Layer, InputSpec class BatchNormGAN(Layer):
|
thank you! @engharat |
With Keras1 now being deprecated, a Keras2 version would be greatly appreciated.
I tried converting it myself but Keras2 does not support the batchnorm mode=2 option, so it will probably require some sort of a workaround.
The text was updated successfully, but these errors were encountered: