Last active
July 27, 2018 06:20
-
-
Save Ouwen/250ad08291cfddabc4f1ecccd9da9ddc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
v = tf.get_variable(name="v", shape=(), initializer=tf.glorot_uniform_initializer()) | |
saver = tf.train.Saver() | |
sess = tf.Session(graph=g1); | |
sess.run(v.initializer) | |
sess.run(v.assign_add(1)) | |
sess.run(v.assign_add(1)) | |
sess.run(v.assign_add(1)) | |
sess.run(v.assign_add(1)) | |
saver.save(sess, "/tmp/model.ckpt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment