Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
e00b4ff1
Commit
e00b4ff1
authored
Aug 21, 2019
by
thomwolf
Browse files
fix #1017
parent
2f939713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
README.md
README.md
+1
-1
No files found.
README.md
View file @
e00b4ff1
...
...
@@ -393,8 +393,8 @@ for batch in train_data:
loss
=
model
(
batch
)
loss
.
backward
()
torch
.
nn
.
utils
.
clip_grad_norm_
(
model
.
parameters
(),
max_grad_norm
)
# Gradient clipping is not in AdamW anymore (so you can use amp without issue)
scheduler
.
step
()
optimizer
.
step
()
scheduler
.
step
()
optimizer
.
zero_grad
()
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment