C3W4 - Assignment TripleLossFn - wrong output

Hi,

I am trying to compute the TripleLossFn for the given vectors, but i’m getting a loss of 0.3517 instead of 0.7. Relevant outputted matrices are given below:
image

As can be seen the second row in the scores matrix is [-0.9535, -1], so in this case there is no closest_negative that is less than the diagonal entry -1.

With the suggested computations the last row of the matrix negative_without_positive is [-2.953, -2] which implies -2 would incorrectly be the maximum.

Am I missing something here? This is my id if you need to look into my code: euibmtfxumzt

Thanks!

Hi Natalie_Caruana,

Unfortunately I cannot access your code through your lab ID.

In case you have not resolved this issue yet, feel free to send me your notebook as an attachment to a direct message. Then I can have a look at what’s going on.