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
be4c41c2
Commit
be4c41c2
authored
Apr 07, 2020
by
Thor Johnsen
Browse files
Bug fix
parent
db8fb976
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
apex/contrib/optimizers/distributed_fused_adam.py
apex/contrib/optimizers/distributed_fused_adam.py
+6
-1
No files found.
apex/contrib/optimizers/distributed_fused_adam.py
View file @
be4c41c2
...
...
@@ -338,7 +338,12 @@ class DistributedFusedAdam(torch.optim.Optimizer):
@
property
def
L2_grad_norm
(
self
):
return
self
.
_L2_grad_norm
if
self
.
_compute_L2_grad_norm
:
for
i
,
blk_st
in
enumerate
(
self
.
_blk_st
):
torch
.
cuda
.
current_stream
().
wait_stream
(
blk_st
)
return
self
.
_L2_grad_norm
else
:
return
None
# Distributed weight update algorithm:
# Model parameters are kept as-is.
...
...
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