Skip to content

Comments

Gradient clipping#1757

Merged
jeffdonahue merged 3 commits intoBVLC:devfrom
jeffdonahue:clip-grads
Feb 14, 2015
Merged

Gradient clipping#1757
jeffdonahue merged 3 commits intoBVLC:devfrom
jeffdonahue:clip-grads

Conversation

@jeffdonahue
Copy link
Contributor

This lets you add a field clip_gradients to a SolverParameter to set the maximum L2 norm of the parameter gradients. If the norm of the gradients exceeds the value set, the gradients are scaled down to have exactly that L2 norm. The L2 norm is computed prior to applying learning rate, etc. -- it applies to the actual loss gradient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like writing or reading these duplicate methods for data and diff -- should these be in SyncedMemory, or perhaps a new abstraction layer between SyncedMemory and Blob?

@jeffdonahue jeffdonahue force-pushed the clip-grads branch 4 times, most recently from 57c2992 to cf79ed9 Compare February 6, 2015 00:47
@jeffdonahue jeffdonahue force-pushed the clip-grads branch 2 times, most recently from c7c283b to 6789a00 Compare February 7, 2015 08:19
@jeffdonahue
Copy link
Contributor Author

Merging after discussion with @shelhamer.

jeffdonahue added a commit that referenced this pull request Feb 14, 2015
@jeffdonahue jeffdonahue merged commit 413ee83 into BVLC:dev Feb 14, 2015
@jeffdonahue jeffdonahue deleted the clip-grads branch February 14, 2015 01:42
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.

1 participant