Commit 63605b95 authored by Chris Mattmann's avatar Chris Mattmann Committed by Toby Boyd
Browse files

Fix for #7225: CIFAR-10 eval fails with error TypeError: Input 'predictions'...

Fix for #7225: CIFAR-10 eval fails with error TypeError: Input 'predictions' of 'InTopKV2' Op has type float16 that contributed by mattmann. (#7227)
parent 3b9025d5
......@@ -123,6 +123,9 @@ def evaluate():
# inference model.
logits = cifar10.inference(images)
logits = tf.cast(logits, "float32")
labels = tf.cast(labels, "int32")
# Calculate predictions.
top_k_op = tf.nn.in_top_k(logits, labels, 1)
......
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