-
-
Save FrancescoSaverioZuppichini/7e22a21a3fedbeaf8a2cac3b1ea98e7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with tf.Session() as sess: | |
mnist_model(x, y) # build the model | |
sess.run(tf.global_variables_initializer()) | |
sess.run(train_init_op, feed_dict={x_: train[0], y_: train[1]}) | |
saver = tf.train.Saver() | |
for i in range(150): | |
acc, _ = sess.run([mnist_model.accuracy, mnist_model.train_step]) | |
if i % 15 == 0: | |
print(acc) | |
saver.save(sess,'/tmp/model.ckpt') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment