Saving the model for ongoing use

To save variables from the TensorFlow session for future use, you can use the Saver() function, which is as follows:

 saver = tf.train.Saver() 

Later, you can retrieve the state of the model and avoid tedious retraining by restoring the following checkpoint:

 ckpt = tf.train.get_checkpoint_state(FLAGS.checkpoint_dir) 
 if ckpt and ckpt.model_checkpoint_path: 
 saver.restore(sess, ckpt.model_checkpoint_path) 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.12.207