提交 a5db4420 编写于 作者: A Ayush Dubey 提交者: Toby Boyd

No checkpointing only if multi worker strategy. (#6322)

上级 8cf8446b
......@@ -486,10 +486,14 @@ def resnet_main(
# Creates a `RunConfig` that checkpoints every 24 hours which essentially
# 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(
train_distribute=distribution_strategy,
session_config=session_config,
save_checkpoints_secs=None,
save_checkpoints_secs=save_checkpoints_secs,
save_checkpoints_steps=None)
# Initializes model with all but the dense layer from pretrained ResNet.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册