Open krasserm opened 6 years ago
@TimSalimans instead of changing the original implementation for Keras 1 I created a new keras_2
directory containing all changes needed for compatibility with Keras 2. The old keras
directory was renamed to keras_1
. Would appreciate your feedback on the PR.
@TimSalimans you can see the actual changes from Keras 1 to Keras 2 in the second commit.
This PR contains the required changes to get
SGDWithWeightnorm
andAdamWithWeightnorm
running with Keras 2.2.3 and Tensorflow 1.11.0. I testedcifar10_cnn.py
with both updated optimizers and training shows reasonable convergence. For testing theconstraint
branch in the optimizer code I temporarily added akernel_constraint
to the firstDense
layer incifar10_cnn.py
(not part of the PR though) with reasonable results. I'm happy to include the test code in the PR if needed.Update: It seems that this project is not active any more. I'll therefore continue maintaining the Keras 2.x version here. For more information about weight normalization implementation options for Keras see this blog post.