Ejemplo n.º 1
0
 def train_eval_model():
     train_spec = tf.estimator.TrainSpec(
         input_fn=lambda: input_utils.train_input_fn(
             FLAGS.train_data, FLAGS.batch_size),
         max_steps=FLAGS.train_steps)
     eval_spec = tf.estimator.EvalSpec(
         input_fn=lambda: input_utils.eval_input_fn(FLAGS.eval_data, FLAGS.
                                                    batch_size),
         start_delay_secs=60,
         throttle_secs=30,
         steps=1000)
     tf.estimator.train_and_evaluate(classifier, train_spec, eval_spec)
Ejemplo n.º 2
0
 def train_model():
     #from tensorflow.python import debug as tf_debug
     #debug_hook = tf_debug.LocalCLIDebugHook()
     classifier.train(input_fn=lambda: input_utils.train_input_fn(
         FLAGS.train_data, FLAGS.batch_size),
                      max_steps=FLAGS.train_steps)