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
a5db4420
Commit
a5db4420
authored
Mar 07, 2019
by
Ayush Dubey
Committed by
Toby Boyd
Mar 07, 2019
Browse files
No checkpointing only if multi worker strategy. (#6322)
parent
8cf8446b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
official/resnet/resnet_run_loop.py
official/resnet/resnet_run_loop.py
+5
-1
No files found.
official/resnet/resnet_run_loop.py
View file @
a5db4420
...
@@ -486,10 +486,14 @@ def resnet_main(
...
@@ -486,10 +486,14 @@ def resnet_main(
# Creates a `RunConfig` that checkpoints every 24 hours which essentially
# Creates a `RunConfig` that checkpoints every 24 hours which essentially
# results in checkpoints determined only by `epochs_between_evals`.
# results in checkpoints determined only by `epochs_between_evals`.
# TODO(ayushd,yuefengz): re-enable checkpointing for multi-worker strategy.
save_checkpoints_secs
=
(
None
if
distribution_strategy
.
__class__
.
__name__
in
[
'CollectiveAllReduceStrategy'
,
'MultiWorkerMirroredStrategy'
]
else
60
*
60
*
24
)
run_config
=
tf
.
estimator
.
RunConfig
(
run_config
=
tf
.
estimator
.
RunConfig
(
train_distribute
=
distribution_strategy
,
train_distribute
=
distribution_strategy
,
session_config
=
session_config
,
session_config
=
session_config
,
save_checkpoints_secs
=
None
,
save_checkpoints_secs
=
save_checkpoints_secs
,
save_checkpoints_steps
=
None
)
save_checkpoints_steps
=
None
)
# Initializes model with all but the dense layer from pretrained ResNet.
# Initializes model with all but the dense layer from pretrained ResNet.
...
...
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