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
d68ec712
Commit
d68ec712
authored
May 27, 2019
by
Michael Carilli
Browse files
test cleanup
parent
848c777d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
tests/L0/run_amp/test_fused_sgd.py
tests/L0/run_amp/test_fused_sgd.py
+2
-7
No files found.
tests/L0/run_amp/test_fused_sgd.py
View file @
d68ec712
...
@@ -758,13 +758,8 @@ class TestMultipleModelsOptimizersLosses(unittest.TestCase):
...
@@ -758,13 +758,8 @@ class TestMultipleModelsOptimizersLosses(unittest.TestCase):
inj_model
.
weight1
.
grad
[
0
]
=
float
(
'inf'
)
inj_model
.
weight1
.
grad
[
0
]
=
float
(
'inf'
)
if
i
!=
inject_inf
:
if
i
!=
inject_inf
:
if
opt_level
==
"O2"
and
not
materialize_master_grads
:
master_params
=
list
(
amp
.
master_params
(
optimizer0
))
+
\
master_params
=
list
(
model0
.
parameters
())
+
\
list
(
amp
.
master_params
(
optimizer1
))
list
(
model1
.
parameters
())
+
\
list
(
model2
.
parameters
())
else
:
master_params
=
list
(
amp
.
master_params
(
optimizer0
))
+
\
list
(
amp
.
master_params
(
optimizer1
))
for
param
,
reference_grad
in
zip
(
master_params
,
for
param
,
reference_grad
in
zip
(
master_params
,
reference_grads
[
what_got_skipped
(
inject_inf
,
reference_grads
[
what_got_skipped
(
inject_inf
,
which_backward
,
which_model
)][
unskipped
]):
which_backward
,
which_model
)][
unskipped
]):
...
...
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