Top-1 Accuracy, 10-Crop: 0.00%
Wall time: 998 µs
%%time
top_5_counter = 0
for i in range(len(y_test)):
guesses, actual = preds_top_5[i], y_test[i]
if actual in guesses:
top_5_counter += 1
print('Top-5 Accuracy, 10-Crop: {0:.2f}%'.format(top_5_counter / len(y_test) * 100))
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()