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
f4ad5410
Commit
f4ad5410
authored
Mar 27, 2017
by
Neal Wu
Browse files
Convert sync_replicas_optimizer -> SyncReplicasOptimizer
parent
1dcdbaab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
inception/inception/inception_distributed_train.py
inception/inception/inception_distributed_train.py
+3
-3
No files found.
inception/inception/inception_distributed_train.py
View file @
f4ad5410
...
...
@@ -52,11 +52,11 @@ tf.app.flags.DEFINE_boolean('log_device_placement', False,
'Whether to log device placement.'
)
# Task ID is used to select the chief and also to access the local_step for
# each replica to check staleness of the gradients in
s
ync
_r
eplicas
_o
ptimizer.
# each replica to check staleness of the gradients in
S
ync
R
eplicas
O
ptimizer.
tf
.
app
.
flags
.
DEFINE_integer
(
'task_id'
,
0
,
'Task ID of the worker/replica running the training.'
)
# More details can be found in the
s
ync
_r
eplicas
_o
ptimizer class:
# More details can be found in the
S
ync
R
eplicas
O
ptimizer class:
# tensorflow/python/training/sync_replicas_optimizer.py
tf
.
app
.
flags
.
DEFINE_integer
(
'num_replicas_to_aggregate'
,
-
1
,
"""Number of gradients to collect before """
...
...
@@ -222,7 +222,7 @@ def train(target, dataset, cluster_spec):
train_op
=
tf
.
identity
(
total_loss
,
name
=
'train_op'
)
# Get chief queue_runners and init_tokens, which is used to synchronize
# replicas. More details can be found in
s
ync
_r
eplicas
_o
ptimizer.
# replicas. More details can be found in
S
ync
R
eplicas
O
ptimizer.
chief_queue_runners
=
[
opt
.
get_chief_queue_runner
()]
init_tokens_op
=
opt
.
get_init_tokens_op
()
...
...
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