TensorFlow: 设置模型保存数量

checkpoint 模型保存数量默认为5个, 为方便管理,调整数量为只保留1个

在train.py 中   加入

run_config = tf.estimator.RunConfig(save_checkpoints_secs=1e9,keep_checkpoint_max = 1)

 modle = tf.estimator.Estimator(
 model_fn=FLAGS.Model_function[0],   model_dir=FLAGS.model_dir,params=FLAGS.Model_fn_params,config=run_config)

参考http://www.chongbaba.com/article-16655-1.html

你可能感兴趣的:(TensorFlow: 设置模型保存数量)