From: Suharsh Sivakumar Date: Thu, 5 Apr 2018 18:36:43 +0000 (-0700) Subject: Fix final eval bottleneck creation to work in cases where it isn't cached already. X-Git-Tag: tflite-v0.1.7~16^2^2~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccad14e8281b244edffb09dc757b1997497dc27c;p=platform%2Fupstream%2Ftensorflow.git Fix final eval bottleneck creation to work in cases where it isn't cached already. Fixes #17423 PiperOrigin-RevId: 191773001 --- diff --git a/tensorflow/examples/image_retraining/retrain.py b/tensorflow/examples/image_retraining/retrain.py index 99a7120..fcc1912 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={