diff options
author | Suharsh Sivakumar <suharshs@google.com> | 2018-04-05 11:36:43 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-05 11:39:03 -0700 |
commit | ccad14e8281b244edffb09dc757b1997497dc27c (patch) | |
tree | 2a610417ba80285010a0e51df3efbcdb518188d6 /tensorflow/examples | |
parent | b691c039c978a34ac4baa47e0e20b9c9d46aa6f7 (diff) |
Fix final eval bottleneck creation to work in cases where it isn't cached already.
Fixes #17423
PiperOrigin-RevId: 191773001
Diffstat (limited to 'tensorflow/examples')
-rw-r--r-- | tensorflow/examples/image_retraining/retrain.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/examples/image_retraining/retrain.py b/tensorflow/examples/image_retraining/retrain.py index 99a71206ac..fcc191250f 100644 --- a/tensorflow/examples/image_retraining/retrain.py +++ b/tensorflow/examples/image_retraining/retrain.py @@ -870,15 +870,16 @@ def run_final_eval(sess, model_info, class_count, image_lists, jpeg_data_tensor, resized_image_tensor: The input node of the recognition graph. bottleneck_tensor: The bottleneck output layer of the CNN graph. """ - (sess, bottleneck_input, ground_truth_input, evaluation_step, - prediction) = build_eval_session(model_info, class_count) - test_bottlenecks, test_ground_truth, test_filenames = ( get_random_cached_bottlenecks(sess, image_lists, FLAGS.test_batch_size, 'testing', FLAGS.bottleneck_dir, FLAGS.image_dir, jpeg_data_tensor, decoded_image_tensor, resized_image_tensor, bottleneck_tensor, FLAGS.architecture)) + + (sess, bottleneck_input, ground_truth_input, evaluation_step, + prediction) = build_eval_session(model_info, class_count) + test_accuracy, predictions = sess.run( [evaluation_step, prediction], feed_dict={ |