1

我正在使用 TPUEstimator 进行培训。我的代码是:

estimator = tf.contrib.tpu.TPUEstimator(use_tpu=FLAGS.use_tpu, model_fn=model_fn, config=run_config,` train_batch_size=FLAGS.train_batch_size, eval_batch_size=FLAGS.eval_batch_size, predict_batch_size=FLAGS.predict_batch_size)

estimator.train(input_fn=train_input_fn, max_steps=num_train_steps)

我尝试使用 InMemoryEvaluatorHook。

train_hook = tf.estimator.experimental.InMemoryEvaluatorHook(estimator, eval_input_fn, steps=FLAGS.save_checkpoints_steps, every_n_iter=1)

estimator.train(input_fn=train_input_fn, max_steps=num_train_steps, hooks=[train_hook])

但我没有得到任何结果

4

0 回答 0