Commit 8fdf31d6 authored by Zhichao Lu's avatar Zhichao Lu Committed by pkulzc
Browse files

Correct the return value from ProcessBatch in the case of an exception.

PiperOrigin-RevId: 190068159
parent 60f170e7
...@@ -215,7 +215,7 @@ def evaluate(create_input_dict_fn, create_model_fn, eval_config, categories, ...@@ -215,7 +215,7 @@ def evaluate(create_input_dict_fn, create_model_fn, eval_config, categories,
except tf.errors.InvalidArgumentError: except tf.errors.InvalidArgumentError:
logging.info('Skipping image') logging.info('Skipping image')
counters['skipped'] += 1 counters['skipped'] += 1
return {} return {}, {}
global_step = tf.train.global_step(sess, tf.train.get_global_step()) global_step = tf.train.global_step(sess, tf.train.get_global_step())
if batch_index < eval_config.num_visualizations: if batch_index < eval_config.num_visualizations:
tag = 'image-{}'.format(batch_index) tag = 'image-{}'.format(batch_index)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment