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
cfa5a657
Unverified
Commit
cfa5a657
authored
Mar 07, 2019
by
mcarilli
Committed by
GitHub
Mar 07, 2019
Browse files
Merge pull request #184 from justusschock/master
Add "dynamic" argument to loss scaler
parents
0c2a629d
1989a575
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
apex/amp/opt.py
apex/amp/opt.py
+1
-1
No files found.
apex/amp/opt.py
View file @
cfa5a657
...
...
@@ -13,7 +13,7 @@ class OptimWrapper(object):
self
.
_num_loss
=
num_loss
self
.
_loss_idx
=
0
self
.
_skip_next
=
[
False
]
*
num_loss
self
.
_loss_scaler
=
[
LossScaler
()
for
_
in
range
(
num_loss
)]
self
.
_loss_scaler
=
[
LossScaler
(
'dynamic'
)
for
_
in
range
(
num_loss
)]
@
contextlib
.
contextmanager
def
scale_loss
(
self
,
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