-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[references/classification] Adding gradient clipping #4824
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
Conversation
💊 CI failures summary and remediationsAs of commit 330c403 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
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.
LGTM, thanks!
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.
LGTM, thanks!
Hey @sallysyw! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Summary: * [references] Adding gradient clipping * ufmt formatting * remove apex code * resolve naming issue Reviewed By: kazhang Differential Revision: D32216659 fbshipit-source-id: 9c5ffb102fa5fd9861ae5ba0c44052920c34ebaf
* [references] Adding gradient clipping * ufmt formatting * remove apex code * resolve naming issue
Gradient Clipping can be useful in training - it is a technique to prevent exploding gradients in very deep networks.
Pytorch has a related API
torch.nn.utils.clip_grad_norm_
which can be utilized here.By applying gradient clipping to training, we significantly improved the training accuracy of our modes. For example:
cc @kazhang @datumbox