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
1989a575
Unverified
Commit
1989a575
authored
Mar 07, 2019
by
Justus Schock
Committed by
GitHub
Mar 07, 2019
Browse files
Add "dynamic" argument to loss scaler
parent
0c2a629d
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 @
1989a575
...
@@ -13,7 +13,7 @@ class OptimWrapper(object):
...
@@ -13,7 +13,7 @@ class OptimWrapper(object):
self
.
_num_loss
=
num_loss
self
.
_num_loss
=
num_loss
self
.
_loss_idx
=
0
self
.
_loss_idx
=
0
self
.
_skip_next
=
[
False
]
*
num_loss
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
@
contextlib
.
contextmanager
def
scale_loss
(
self
,
loss
):
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