- Notifications
You must be signed in to change notification settings - Fork 5.4k
Added Random Normal Init and fixed optimizer hyperparameters #1715
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
Conversation
| Friendly ping @yashk2810 |
| Merge conflict, please rebase |
| "# Random Normal model initializers as per Dc-gan paper\n", | ||
| "RN_initializers=tf.keras.initializers.RandomNormal(mean=0.0,stddev=0.02)\n\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great observation about the zero-centered Normal, thanks for bringing this up.
I have a few style-related suggestions, if you don't mind:
- Change the DCGAN spelling from "Dc-gan" (source: https://arxiv.org/pdf/1511.06434.pdf) (in the code comment)
- Change to
weight initializer, instead ofmodel initializers(also in the code comment) - Add a blank line before the generator method
- Add a space in the params section in
RandomNormal()after a comma (I think it's PEP 8: https://www.python.org/dev/peps/pep-0008/)
| "# Random Normal model initializers as per Dc-gan paper\n", | |
| "RN_initializers=tf.keras.initializers.RandomNormal(mean=0.0,stddev=0.02)\n\n", | |
| "# Random Normal weight initializer as per the DCGAN paper\n", | |
| "RN_initializers=tf.keras.initializers.RandomNormal(mean=0.0, stddev=0.02)\n\n", | |
Also, since it's a weight initializer (singular), maybe you should rename the variable to RN_initializer without the s.
Anyway, these are just recommendations 👍
In response to the discussions in this pull request, this pull request adds Random normal initializer with mean 0 and std-dev 1, and fixes the optimizer hyper-parameters as per DC-GAN paper.
I am sure there is a more graceful way to do this, but I found this way much easier than to fix code in the same pull request.
Sorry about that!