Hi. I was unable to pass one test in TripletLoss function. I checked this post (C3W3Assignment: Exercise 02 TripletLossFn()) and compared my values against the values provided there. I was getting an incorrect value in the very beginning. For me, the variable ‘scores’ looked like this:
[[ 1. -0.95350769]
[ 0.95350769 -1. ]]
However, according to the post, that value should be:
[[ 1. 0.95350769]
[ -0.95350769 -1. ]]
I realized that if I did: tf.linalg.matmul(v2, v1, transpose_b = True) instead of tf.linalg.matmul(v1, v2, transpose_b = True), I was able to pass the test.
Why should we use tf.linalg.matmul(v2, v1, transpose_b = True) instead of tf.linalg.matmul(v1, v2, tranpose_b = True).
Thank you!