April 2017
Intermediate to advanced
320 pages
7h 46m
English
To save a model, we use the Saver() class. It saves the graph structure using checkpoints: these are binary files in a proprietary format, which map variable names to tensor values. The following code saves the model into our current working directory as two files:
The following code must be inserted at the end of the previous model:
saver = tf.train.Saver() save_path = saver.save(sess, "softmax_mnist") print("Model saved to %s" % save_path)
Read now
Unlock full access