In the exercise 2nd of the assignment I implemented the custom Triplet Loss function in TensorFlow for a similarity learning task. The function is designed to compute the loss between two vectors v1
and v2
based on the cosine similarity and a margin parameter. However, the output of the function does not match the expected output.
The Triplet Loss function is expected to return a loss value of approximately 0.70 for the given input vectors v1
and v2
. However, the actual output differs from this expectation. It’s 4.453507693899828 in my case.
I have verified the implementation and made sure that there’s no syntax error or typing mistake.
I would appreciate any insights or suggestions on how to troubleshoot and resolve this issue effectively. Thank you for your assistance!