fix densenet accuracy test crash in test script
@@ -352,6 +352,9 @@ class eval_classifier_optimized_graph:
{input_tensor: np_images})
elapsed_time = time.time() - start_time
+ if len(predictions.shape) > 2:
+ predictions = predictions.reshape(predictions.shape[0], -1)
+
with tf.Graph().as_default() as accu_graph:
accuracy1 = tf.reduce_sum(
input_tensor=tf.cast(tf.nn.in_top_k(predictions=tf.constant(predictions),
