-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Enable BatchNorm for Keras Model in DDPG Example #246
Conversation
examples/rl/ddpg_pendulum.py
Outdated
""" | ||
|
||
""" | ||
After 100 episodes: | ||
|
||
![after_img](https://i.imgur.com/eEH8Cz6.gif) | ||
|
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.
How did the extra whitespace get added? You can remove it.
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.
Yeah, Many blank lines are added by black
.
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.
black
does not add any such blank lines. Let's get rid of them.
- Start from the original file (on the
master
branch) - Add the
training=True
statements and modify the "last modified" date - Run
black ddpg_pendulum.py
- Commit the file
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.
You can also just remove the added extra space by hand...
Please add the generated files.
Sorry for the late response. Deleted extra lines manually. Generating files with cmd - gave the following error - |
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.
Thanks, I will refresh the files then.
FYI batchnorm breaks training entirely so I have removed it. |
training=True
was added to each model call to enable BatchNorm.