Hi @roses_r_red

Your code requires correction for triplet_loss1 and triplet_loss2

While calculating the A and B

A = subtract `positive`

from `margin`

and add `closest_negative`

B = subtract `positive`

from `margin`

and add `mean_negative`

You have used correctly the codes but because you have missed tuppling in these codes caused these error.

Remember the instructions mentions first to subtract (margin-positive) and then add closest negative for A and mean_negative for B

Also while recalling triplet loss1 and triplet loss2 mentions you to compute tf.maximum among 0.0 and A for triplet loss1, 0.0 and B for triplet loss2, so here the tuple placement between the 0.0 and A calculation is required.

Regards

DP