Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Compatibility with Keras 2.2.3 and Tensorflow 1.11.0#13

Open
krasserm wants to merge 2 commits into
openai:masterfrom
krasserm:keras-upgrade
Open

Compatibility with Keras 2.2.3 and Tensorflow 1.11.0#13
krasserm wants to merge 2 commits into
openai:masterfrom
krasserm:keras-upgrade

Conversation

@krasserm
Copy link
Copy Markdown

@krasserm krasserm commented Oct 3, 2018

This PR contains the required changes to get SGDWithWeightnorm and AdamWithWeightnorm running with Keras 2.2.3 and Tensorflow 1.11.0. I tested cifar10_cnn.py with both updated optimizers and training shows reasonable convergence. For testing the constraint branch in the optimizer code I temporarily added a kernel_constraint to the first Dense layer in cifar10_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.

@krasserm krasserm force-pushed the keras-upgrade branch 2 times, most recently from d95423e to 1c462bd Compare October 6, 2018 06:51
@krasserm
Copy link
Copy Markdown
Author

krasserm commented Oct 6, 2018

@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.

@krasserm
Copy link
Copy Markdown
Author

krasserm commented Oct 6, 2018

@TimSalimans you can see the actual changes from Keras 1 to Keras 2 in the second commit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant