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
b5c6170e
Commit
b5c6170e
authored
Nov 04, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Nov 04, 2020
Browse files
Internal change
PiperOrigin-RevId: 340748908
parent
3d976e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
official/nlp/tasks/electra_task.py
official/nlp/tasks/electra_task.py
+0
-1
No files found.
official/nlp/tasks/electra_task.py
View file @
b5c6170e
...
@@ -215,7 +215,6 @@ class ElectraPretrainTask(base_task.Task):
...
@@ -215,7 +215,6 @@ class ElectraPretrainTask(base_task.Task):
aux_losses
=
model
.
losses
)
aux_losses
=
model
.
losses
)
# Scales loss as the default gradients allreduce performs sum inside the
# Scales loss as the default gradients allreduce performs sum inside the
# optimizer.
# optimizer.
# TODO(b/154564893): enable loss scaling.
scaled_loss
=
loss
/
tf
.
distribute
.
get_strategy
().
num_replicas_in_sync
scaled_loss
=
loss
/
tf
.
distribute
.
get_strategy
().
num_replicas_in_sync
tvars
=
model
.
trainable_variables
tvars
=
model
.
trainable_variables
grads
=
tape
.
gradient
(
scaled_loss
,
tvars
)
grads
=
tape
.
gradient
(
scaled_loss
,
tvars
)
...
...
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