Triplet Loss UNQ_C3

I have one failed test

Wrong output.
Expected 0.703507661819458.
Got 1.453507661819458
5 Tests passed
1 Tests failed

What did i possibly do wrong?

Here is my mask :
mask_exclude_positives = (fastnp.identity(batch_size) == 1) | (negative_zero_on_duplicate > positive.reshape(batch_size,1))

Hi @JonathanJordan21

You probably followed the misleading comment above mean_negative. The instructions in the markdown cell (above TripletLossFn are correct:

Check if it solves your problem.