UNQ_C1 is for programming the triplet loss function

I may be wrong in what the flow of computing it is but from what I understand.

the triplet loss is computed as followed

max\left(\left[\sum_{m=1}^{M}{\left(\sum_{i=1}^{N}{(A^m_i - P^m_i)^2} - \sum_{i=1}^{N}{(A^m_i - N^m_i)^2} + \alpha\right)}, 0\right]\right)

where M is the examples in the batch and N is the features

upon running the tests, all passed except the last one which shows

for M=2 where the basic loss of the batch is [5, -2] the correct loss is 5 instead of 3, therefore the correct equation for the triplet loss should be

max\left(\left[max\left(\sum_{i=1}^{N}{(A^m_i - P^m_i)^2} - \sum_{i=1}^{N}{(A^m_i - N^m_i)^2} + \alpha\right), 0\right]\right)

however, adapting the code where loss is calculated to

results in a earlier unit test to fail, whch can be seen where

for M=2 where basic loss of the batch is [1, 1], the correct loss is 2, which is contradictory to what the last unit test states