Skip to content
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

GradClipByValue callback #315

Merged
merged 13 commits into from
Aug 31, 2021
Merged

GradClipByValue callback #315

merged 13 commits into from
Aug 31, 2021

Conversation

zoq
Copy link
Member

@zoq zoq commented Aug 7, 2021

Writing a recurrent network test case where the gradient explodes, so implemented gradient clipping.

Copy link
Member

@rcurtin rcurtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This is nice to add and the implementation is quite simple. 👍

doc/callbacks.md Outdated

Given the gradient, and a maximum norm value, the callback normalizes the
gradient so that its L2-norm is less than or equal to the given maximum norm
value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be useful to add a sentence or two about where and when this is useful. (Same for GradClipByValue.) 👍

include/ensmallen_bits/callbacks/grad_clip_by_norm.hpp Outdated Show resolved Hide resolved
include/ensmallen_bits/callbacks/grad_clip_by_value.hpp Outdated Show resolved Hide resolved
tests/callbacks_test.cpp Show resolved Hide resolved
doc/callbacks.md Outdated Show resolved Hide resolved
doc/callbacks.md Outdated Show resolved Hide resolved
Copy link

@mlpack-bot mlpack-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second approval provided automatically after 24 hours. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants