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
OpenDAS
apex
Commits
e87b5799
"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "91da96431f836d8865b416f7d4a6e19c92ec0a15"
Commit
e87b5799
authored
Oct 08, 2019
by
Jan Schlüter
Committed by
mcarilli
Oct 07, 2019
Browse files
Include loss scaling in README code example (#523)
parent
1904e48d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
README.md
README.md
+3
-0
No files found.
README.md
View file @
e87b5799
...
@@ -67,6 +67,9 @@ model, optimizer = amp.initialize(model, optimizer, opt_level=opt_level)
...
@@ -67,6 +67,9 @@ model, optimizer = amp.initialize(model, optimizer, opt_level=opt_level)
# Train your model
# Train your model
...
...
with
amp
.
scale_loss
(
loss
,
optimizer
)
as
scaled_loss
:
scaled_loss
.
backward
()
...
# Save checkpoint
# Save checkpoint
checkpoint
=
{
checkpoint
=
{
...
...
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