Saving model in tensorflow

后端 未结 1 891
自闭症患者
自闭症患者 2021-02-11 03:26

Tensorflow allows us to save/load model\'s structure, using method tf.train.write_graph, so that we can restore it in the future to continue our training session. However, I\'m

1条回答
  •  臣服心动
    2021-02-11 03:37

    First of all you have to understand, that tensorflow graph does not have current weights in it (until you save them manually there) and if you load model structure from graph.pb, you will start you train from the very beginning. But if you want to continue train or use your trained model, you have to save checkpoint (using tf Saver) with the values of the variables in it, not only the structure. Check out this tread: Tensorflow: How to restore a previously saved model (python)

    0 讨论(0)
提交回复
热议问题