Function triplet_loss()

I’m having difficulty getting the expected output of the triplet_loss() function. I have used tf functions for every operation.

I’m getting an assertion error in the second test which is y_pred = ([1., 1.], [1., 1.], [1., 1.,]).

My code:

Any help will be appreciated.

Guess what, there was nothing wrong. I just erased everything, wrote it again, and it worked perfectly.

Never thought, I have to do this in programming.