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
f91bc66b
Commit
f91bc66b
authored
Mar 12, 2020
by
Thor Johnsen
Browse files
Bug fix
parent
a3743069
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
apex/contrib/optimizers/fused_adam.py
apex/contrib/optimizers/fused_adam.py
+1
-3
No files found.
apex/contrib/optimizers/fused_adam.py
View file @
f91bc66b
...
@@ -118,7 +118,7 @@ class FusedAdam(torch.optim.Optimizer):
...
@@ -118,7 +118,7 @@ class FusedAdam(torch.optim.Optimizer):
self
.
_step
(
grads
,
output_params
,
scale
,
grad_norms
,
False
,
True
)
self
.
_step
(
grads
,
output_params
,
scale
,
grad_norms
,
False
,
True
)
return
loss
return
loss
def
_step
(
self
,
grads
,
output_params
,
scale
.
,
grad_norms
,
check_overflow
,
undo
):
def
_step
(
self
,
grads
,
output_params
,
scale
,
grad_norms
,
check_overflow
,
undo
):
if
check_overflow
:
if
check_overflow
:
modified_params
=
[]
modified_params
=
[]
...
@@ -280,5 +280,3 @@ class FusedAdam(torch.optim.Optimizer):
...
@@ -280,5 +280,3 @@ class FusedAdam(torch.optim.Optimizer):
if
check_overflow
:
if
check_overflow
:
for
i
,
out_p
in
enumerate
(
modified_params
):
for
i
,
out_p
in
enumerate
(
modified_params
):
self
.
strided_check_finite
(
out_p
,
stride
=
out_p
.
numel
(),
start
=
0
,
end
=
out_p
.
numel
(),
clear
=
True
if
i
==
0
else
False
)
self
.
strided_check_finite
(
out_p
,
stride
=
out_p
.
numel
(),
start
=
0
,
end
=
out_p
.
numel
(),
clear
=
True
if
i
==
0
else
False
)
return
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