Open Gu-Youngfeng opened 5 years ago
# variables initialization
init = tf.global_variables_initializer()
# saver
saver = tf.train.Saver()
with tf.Session() as sess:
sess.run(init)
saver.save(sess, "models/lstm.ckpt") # save the model into lstm.ckpt
saver = tf.train.import_meta_graph("models/nn.ckpt.meta")
with tf.Session() as sess:
saver.restore(sess, "models/nn.ckpt")
graph = tf.get_default_graph()
...
In Tensorflow, we use object
tf.train.Saver()
to save the trained model, the generated files includeExcept for the first file(checkpoint), all the files cannot be opened by normal notepad. What do they mean and how can I use them?