【问题标题】:what is the difference between tf.checkpoint.save() and tf.checkpointmanager.save() in tensorflow?张量流中的 tf.checkpoint.save() 和 tf.checkpointmanager.save() 有什么区别?
【发布时间】:2020-09-12 09:52:47
【问题描述】:

我希望使用 tf.checkpoints 保存一个图像字幕模型 (https://www.tensorflow.org/tutorials/text/image_captioning)。当我使用 tf.checkpoint.save() 和 tf.checkpointmanager.save() 保存模型时有什么区别?保存什么样的文件?它是某种自己的检查点文件还是它是什么?谢谢!

【问题讨论】:

    标签: python tensorflow tensorflow2.0 tensorflow-lite


    【解决方案1】:

    CheckpointManager 允许您管理多个检查点。 checkpoint.save() 只会保存一个检查点。

    在 Tensorflow 文档中解释了 here

    tf.train.CheckpointManager(
        checkpoint, directory, max_to_keep, keep_checkpoint_every_n_hours=None,
        checkpoint_name='ckpt', step_counter=None, checkpoint_interval=None,
        init_fn=None
    )
    
    

    【讨论】:

      猜你喜欢
      • 2023-04-02
      • 1970-01-01
      • 2023-03-07
      • 2016-06-25
      • 1970-01-01
      • 1970-01-01
      • 2018-09-11
      • 1970-01-01
      相关资源
      最近更新 更多