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
e7f19560
Commit
e7f19560
authored
Mar 26, 2019
by
Michael Carilli
Browse files
Add some links
parent
dc55a996
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
apex/amp/handle.py
apex/amp/handle.py
+5
-2
No files found.
apex/amp/handle.py
View file @
e7f19560
...
...
@@ -37,7 +37,7 @@ def scale_loss(loss,
unscaled. The direct ``.grad`` attributes of any FP16
model params will remain scaled after context manager exit.
This subtlety affects gradient clipping. See "Gradient clipping" under
"
Advanced use cases
"
for best practices.
`
Advanced use cases
`_
for best practices.
Args:
loss(Tensor): Typically a scalar Tensor. The ``scaled_loss`` that the context
...
...
@@ -54,7 +54,10 @@ def scale_loss(loss,
.. warning::If ``True``, ``optimizer.step()`` cannot be
called yet after context manager exit, and must wait for another, later backward context
manager invocation with ``delay_unscale`` left to False.
See "Advanced use cases" for examples.
See `Advanced use cases`_ for examples.
.. _`Advanced use cases`:
https://nvidia.github.io/apex/amp.html#advanced-use-cases
"""
if
not
_amp_state
.
opt_properties
.
enabled
:
yield
loss
...
...
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