I am having trouble with this exercise. If I test my code into the accuracy computation of C3W3_Accuracy notebook the accuracy is computed properly. But I am getting the accuracy wrong even in the example of the notebook. For the unitests I am getting 50% of the tests wrong.
I am vectorizing the operation instead of going through a loop. I am using:
accuracy = tf.math.reduce_sum(…)
to compute the sum over the comparison of y_pred and y_test. The comparison is done with tf.cast(…).