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
ModelZoo
ResNet50_tensorflow
Commits
dc2ae42c
Commit
dc2ae42c
authored
Oct 08, 2020
by
Ran Chen
Committed by
A. Unique TensorFlower
Oct 08, 2020
Browse files
Internal change
PiperOrigin-RevId: 336215069
parent
2fa75516
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
official/staging/training/grad_utils.py
official/staging/training/grad_utils.py
+1
-1
No files found.
official/staging/training/grad_utils.py
View file @
dc2ae42c
...
...
@@ -73,7 +73,7 @@ def _filter_and_allreduce_gradients(grads_and_vars,
hints
=
tf
.
distribute
.
experimental
.
CollectiveHints
(
bytes_per_pack
=
bytes_per_pack
)
allreduced_grads
=
tf
.
distribute
.
get_replica_context
().
all_reduce
(
tf
.
distribute
.
ReduceOp
.
SUM
,
grads
,
experimental_hints
=
hints
)
tf
.
distribute
.
ReduceOp
.
SUM
,
grads
,
hints
)
if
allreduce_precision
==
"float16"
:
allreduced_grads
=
[
tf
.
cast
(
grad
,
"float32"
)
for
grad
in
allreduced_grads
]
return
allreduced_grads
,
variables
...
...
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