Skip to content

Instantly share code, notes, and snippets.

@ravi07bec
Created October 29, 2020 06:28
Show Gist options
  • Save ravi07bec/6f83773a3e74d93b6be46e0692929d3e to your computer and use it in GitHub Desktop.
Save ravi07bec/6f83773a3e74d93b6be46e0692929d3e to your computer and use it in GitHub Desktop.
import os
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
LOG_DIR = 'logs'
mnist = input_data.read_data_sets('MNIST_data')
images = tf.Variable(mnist.test.images, name='images')
with tf.Session() as sess:
saver = tf.train.Saver([images])
sess.run(images.initializer)
saver.save(sess, os.path.join(LOG_DIR, 'images.ckpt'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment