【发布时间】:2016-12-07 13:13:00
【问题描述】:
我使用以下代码在每 10 个 epoch 后使用 tensorflow 检查点:
checkpoint_dir = os.path.abspath(os.path.join(out_dir, "checkpoints"))
checkpoint_prefix = os.path.join(checkpoint_dir, "model")
...
if current_step % checkpoint_every == 0:
path = saver.save(sess, checkpoint_prefix, global_step=current_step)
print("Saved model checkpoint to {}\n".format(path))
问题是,随着新文件的生成,之前的 5 个模型文件会被自动删除。
【问题讨论】:
标签: tensorflow checkpoint