C3W3_Assignment Invalid Confusion Matrix but Correct Accuracy

I am unable to figure out that how to calculate the confusion matrix for exercise 4. Please have a look at the output that I am getting

As you see, your confusion matrix is rotated compared to the expected result. There is high possibility that you are doing something wrong in:

#Compute the cosine similarity. Using tf.math.reduce_sum.
# Don’t forget to use the appropriate axis argument.

1 Like