Train MNIST for a number of steps.
// Get the sets of images and labels for training, validation, and
// test on MNIST.
data_sets = input_data.read_data_sets(tempfile.mkdtemp(), FLAGS.fake_data)
// Tell TensorFlow that the model will be built into the default Graph.
with tf.Graph().as_default():
After Change
// Get the sets of images and labels for training, validation, and
// test on MNIST. If input_path is specified, download the data from GCS to
// the folder expected by read_data_sets.
data_dir = tempfile.mkdtemp()
if FLAGS.input_path:
files = [os.path.join(FLAGS.input_path, file_name)
for file_name in INPUT_FILES]
subprocess.check_call(["gsutil", "-m", "-q", "cp", "-r"] + files +
[data_dir])
data_sets = input_data.read_data_sets(data_dir, FLAGS.fake_data)
// Tell TensorFlow that the model will be built into the default Graph.
with tf.Graph().as_default():
// Generate placeholders for the images and labels and mark as input.