"tests/vscode:/vscode.git/clone" did not exist on "fd7b962f7ae01b7f6ffbcdb31b4b53297174a645"
Commit e87b5799 authored by Jan Schlüter's avatar Jan Schlüter Committed by mcarilli
Browse files

Include loss scaling in README code example (#523)

parent 1904e48d
......@@ -67,6 +67,9 @@ model, optimizer = amp.initialize(model, optimizer, opt_level=opt_level)
# Train your model
...
with amp.scale_loss(loss, optimizer) as scaled_loss:
scaled_loss.backward()
...
# Save checkpoint
checkpoint = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment