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
c356290c
Unverified
Commit
c356290c
authored
Dec 01, 2019
by
Aditya Soni
Committed by
GitHub
Dec 01, 2019
Browse files
typo fix as per Pytorch v1.1+
parent
b0ee7c7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/migration.md
docs/source/migration.md
+1
-1
No files found.
docs/source/migration.md
View file @
c356290c
...
@@ -104,6 +104,6 @@ for batch in train_data:
...
@@ -104,6 +104,6 @@ for batch in train_data:
loss
=
model
(
batch
)
loss
=
model
(
batch
)
loss
.
backward
()
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)
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
()
optimizer
.
step
()
scheduler
.
step
()
```
```
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