How to Pause / Resume Training in Tensorflow

后端 未结 3 1830
鱼传尺愫
鱼传尺愫 2021-01-05 03:15

This question was made before the documentation for save and restore was available. For now I would consider this question deprecated and say people to rely on the official

3条回答
  •  旧巷少年郎
    2021-01-05 04:04

    As described by Hamed, the right way to do it on tensorflow is

        saver=tf.train.Saver()
        save_path='checkpoints/'
        -----> while training you can store using
        saver.save(sess=session,save_path=save_path)
        -----> and restore
        saver.restore(sess=session,save_path=save_path)
    

    this will load the model where you last saved it and will the training(if you want) from there only.

提交回复
热议问题