Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def save_weights(sess):
saver = tf.train.Saver(), './data/tf_io.ckpt')
def load_weights(sess, in_name, out_name):
saver = tf.train.Saver()
saver.restore(sess, './data/tf_io.ckpt')
X = tf.get_default_graph().get_tensor_by_name(in_name)
y = tf.get_default_graph().get_tensor_by_name(out_name)
return X, y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment