if FLAGS.dataset == "mnist":
dataset = mnist_input
model = mnist_model
elif FLAGS.dataset == "cifar":
dataset = cifar_inputmodel = cifar_model
else:
raise ValueError("Invalid dataset: %s" % FLAGS.dataset)
// TPU-based estimator used for TRAIN and EVAL
After Change
config=config)
// Get the tf.Estimator `input_fn` for training and evaluation.
train_eval_input_fn = functools.partial(input_fn, dataset=dataset)
tf.gfile.MakeDirs(os.path.join(FLAGS.model_dir, "generated_images"))
current_step = estimator._load_global_step_from_checkpoint_dir(FLAGS.model_dir) // pylint: disable=protected-access,line-too-long
tf.logging.info("Starting training for %d steps, current step: %d" %