need to ask for help again. Couldn’t get the accuracy value correct within C3W3 assignment, ex 4 - classify.
After predicting the test gen data the result is split up the same way as in the tripletloss function a couple of cells above resulting in v1 and v2 shapes of (10240,128). The “d” is calculated with the reduce_sum of the product of the two vectors with axis=1. Shape collapses down to (10240,). After that i’ve made an compare of d>thres within the tf.cast to get y_pred. The accuracy is then calculated via a reduce_mean on y_pred like mentioned in this post
No axis argument should be necessary because it is only (10240,).
Finally confusion matrix is calculated with y_test and y_pred. The values of the CM are as they shoud be, accuracy is only at 0.396…
Can someone give me a hint what i have missed? All unit tests as well as the autograder for the earlier ex are passed.
You can create a new post for more visibility on this issue!
In the meantime, make sure that both d and threshold are properly defined as tensors with compatible shapes for the comparison. Also, if you’re encountering a specific error, feel free to share the error message.