Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add checkpoint_max_to_keep to train_loop #10977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion research/object_detection/model_main_tf2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
'MultiWorkerMirroredStrategy. When num_workers = 1 it uses '
'MirroredStrategy.')
flags.DEFINE_integer(
'checkpoint_every_n', 1000, 'Integer defining how often we checkpoint.')
'checkpoint_every_n', 1000, 'Integer defining how often we save the checkpoint.')
flags.DEFINE_integer(
'checkpoint_max_to_keep', 7, 'Integer defining how many checkpoints to save.')
flags.DEFINE_boolean('record_summaries', True,
('Whether or not to record summaries defined by the model'
' or the training pipeline. This does not impact the'
Expand Down Expand Up @@ -108,6 +110,7 @@ def main(unused_argv):
train_steps=FLAGS.num_train_steps,
use_tpu=FLAGS.use_tpu,
checkpoint_every_n=FLAGS.checkpoint_every_n,
checkpoint_max_to_keep=FLAGS.checkpoint_max_to_keep,
record_summaries=FLAGS.record_summaries)

if __name__ == '__main__':
Expand Down