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
9033ad58
Commit
9033ad58
authored
May 02, 2020
by
Kexin Yu
Browse files
initialize with tensor
parent
f560bd0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
apex/optimizers/fused_lamb.py
apex/optimizers/fused_lamb.py
+1
-1
No files found.
apex/optimizers/fused_lamb.py
View file @
9033ad58
...
@@ -117,7 +117,7 @@ class FusedLAMB(torch.optim.Optimizer):
...
@@ -117,7 +117,7 @@ class FusedLAMB(torch.optim.Optimizer):
else
:
else
:
raise
RuntimeError
(
'FusedLAMB only support fp16 and fp32.'
)
raise
RuntimeError
(
'FusedLAMB only support fp16 and fp32.'
)
g_norm_32
,
g_norm_16
=
0.0
,
0.0
g_norm_32
,
g_norm_16
=
torch
.
zeros
(
1
),
torch
.
zeros
(
1
)
# compute grad norm for two lists
# compute grad norm for two lists
if
len
(
g_all_32
)
>
0
:
if
len
(
g_all_32
)
>
0
:
g_norm_32
=
multi_tensor_applier
(
self
.
multi_tensor_l2norm
,
g_norm_32
=
multi_tensor_applier
(
self
.
multi_tensor_l2norm
,
...
...
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