6 lines
205 B
Python
6 lines
205 B
Python
## Tripelet Loss
|
|
## Core Idea:
|
|
## The distance of Anchor and Positive should greater than the distance of Achore and Negative.
|
|
## L(A, P, N) = max(||f(A) - f(P)||^2 - ||f(A) - f(N)||^2 + a, 0)
|
|
|