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
5ae6008d
Commit
5ae6008d
authored
Apr 15, 2019
by
Michael Carilli
Browse files
For testing purposes, enable the case where FusedAdam is not wrapped by amp
parent
53fd093d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
apex/optimizers/fused_adam.py
apex/optimizers/fused_adam.py
+5
-4
No files found.
apex/optimizers/fused_adam.py
View file @
5ae6008d
...
@@ -78,6 +78,7 @@ class FusedAdam(torch.optim.Optimizer):
...
@@ -78,6 +78,7 @@ class FusedAdam(torch.optim.Optimizer):
if
closure
is
not
None
:
if
closure
is
not
None
:
loss
=
closure
()
loss
=
closure
()
if
hasattr
(
self
,
"_amp_stash"
):
grads
=
self
.
_amp_stash
.
grads
grads
=
self
.
_amp_stash
.
grads
output_params
=
self
.
_amp_stash
.
output_params
output_params
=
self
.
_amp_stash
.
output_params
scale
=
self
.
_amp_stash
.
scale
scale
=
self
.
_amp_stash
.
scale
...
...
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