Hi mihaidusmanu,
In the paper,the p(c)=||dA-dB||2.In the code,loss.py 86 line,
positive_distance = 2 - 2 * (
descriptors1.t().unsqueeze(1) @ descriptors2.t().unsqueeze(2)
).squeeze().
They are not equal.
I am not sure I understand what you mean. The descriptors are L2 normalized on lines 54 and 57 respectively, so the squared L2 distance can be formulated as in the code.
Hi mihaidusmanu, In the paper,the p(c)=||dA-dB||2.In the code,loss.py 86 line, positive_distance = 2 - 2 * ( descriptors1.t().unsqueeze(1) @ descriptors2.t().unsqueeze(2) ).squeeze(). They are not equal.