adambielski / siamese-triplet

Siamese and triplet networks with online pair/triplet mining in PyTorch
BSD 3-Clause "New" or "Revised" License
3.1k stars 633 forks source link

Relu in Triplet loss #44

Closed tuandoan998 closed 4 years ago

tuandoan998 commented 4 years ago

https://github.com/adambielski/siamese-triplet/blob/0c719f9e8f59fa386e8c59d10b2ddde9fac46276/losses.py#L37

Why does you using activate relu here? Thank you.

adambielski commented 4 years ago

ReLU does max(0, x), which is in the definition of triplet loss.

tuandoan998 commented 4 years ago

oh, I got it. Thank you very much.