Tutorial by Examples

Saving a model in tensorflow is pretty easy. Let's say you have a linear model with input x and want to predict an output y. The loss here is the mean square error (MSE). The batch size is 16. # Define the model x = tf.placeholder(tf.float32, [16, 10]) # input y = tf.placeholder(tf.float32, [16...
Restoring is also quite nice and easy. Here's a handy helper function: def restore_vars(saver, sess, chkpt_dir): """ Restore saved net, global score and step, and epsilons OR create checkpoint directory for later storage. """ sess.run(tf.initialize_all_...

Page 1 of 1