thinc icon indicating copy to clipboard operation
thinc copied to clipboard

Triplet loss implementation

Open amirj opened this issue 3 years ago • 1 comments

For a use case, I'm interested to use triplet/hinge loss, looking at the implementation of different losses in Thinc, I can't see something similar. Though there are various implementation in TensorFlow or PyTorch, it's not clear to me how can I leverage them to implement get_grad and get_loss functions.

amirj avatar May 24 '21 21:05 amirj

Hey @amirj,

Sorry for the late reply! Currently we do not support the Triplet loss, but you could try out L2Distance and CosineDistance losses. Both losses are applicable in the scenario where you are trying to map two spaces onto the same one. Does this help?

kadarakos avatar Aug 19 '22 13:08 kadarakos