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
01e29c97
Commit
01e29c97
authored
Sep 05, 2018
by
Michael Carilli
Browse files
minor fix
parent
ed14f39c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
apex/parallel/distributed.py
apex/parallel/distributed.py
+4
-4
No files found.
apex/parallel/distributed.py
View file @
01e29c97
...
@@ -271,10 +271,10 @@ class DistributedDataParallel(Module):
...
@@ -271,10 +271,10 @@ class DistributedDataParallel(Module):
# Forward has the authority to set needs_refresh to True, but only allreduce_params
# Forward has the authority to set needs_refresh to True, but only allreduce_params
# in backward has the authority to set needs_refresh to False.
# in backward has the authority to set needs_refresh to False.
# Parentheses are not necessary for correct order of operations, but make the intent clearer.
# Parentheses are not necessary for correct order of operations, but make the intent clearer.
if
(
not
self
.
param_refs
)
or
if
(
(
not
self
.
param_refs
)
or
self
.
shared_param
or
self
.
shared_param
or
(
len
(
param_list
)
!=
len
(
self
.
param_refs
))
or
(
len
(
param_list
)
!=
len
(
self
.
param_refs
))
or
any
([
param1
is
not
param2
for
param1
,
param2
in
zip
(
param_list
,
self
.
param_refs
)]):
any
([
param1
is
not
param2
for
param1
,
param2
in
zip
(
param_list
,
self
.
param_refs
)])
)
:
self
.
needs_refresh
=
True
self
.
needs_refresh
=
True
if
self
.
needs_refresh
:
if
self
.
needs_refresh
:
...
...
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