【发布时间】:2018-08-21 20:23:11
【问题描述】:
我对 Tensorflow 对象检测 API 有一些疑问。
训练时,仅存储前 5 个检查点。我想存储更多,比如前 10 个检查点。如何才能做到这一点? (我觉得应该是object_detection/protos中
train.proto的参数之一。)-
默认情况下,检查点每 10 分钟(600 秒)存储一次。要改变这个频率,我认为是这两个参数之一必须改变,请确认是哪一个:
来自
learning.pyin /home/user/tensorflow-gpu/lib/python3.5/site-packages/tensorflow/contrib/slim/python/slimsave_summaries_secs=600或save_interval_secs=600 在训练我的模型 (ssd_mobilenet_v2_coco_2018_03_29) 时,我还同时运行评估。 eval 图中表示的最新检查点始终落后于保存在 object_detection/training 文件夹中的最新检查点。例如,在下面的例子中,图上显示的最新检查点是 29.437k,而模型已经训练到检查点 32.891k(并保存在 training 文件夹中)。这种滞后(20 分钟滞后)的原因是什么?为什么一步(10 分钟)不足以对训练好的模型进行评估?
【问题讨论】:
-
这篇文章应该可以工作,我相信可以改变 keep_checkpoint_every_n_hours
-
第二点,这个解决方案对我有用:github.com/tensorflow/models/issues/5139#issuecomment-418963839。例如,在每 1000 步后保存模型,将行(在链接中的解决方案中提到)从:“config = tf.estimator.RunConfig(model_dir=FLAGS.model_dir)”更改为:“config = tf.estimator .RunConfig(model_dir=FLAGS.model_dir, save_checkpoints_steps = 1000)"
标签: python tensorflow image-processing object-detection object-detection-api