Skip to content

hrithickcodes/Triplet_loss_on_MNIST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Triplet loss on MNIST

Triplet loss is a loss function for machine learning algorithms where a baseline (anchor) input is compared to a positive (truthy) input and a negative (falsy) input. Triplet loss was first introduced in the paper FaceNet: A Unified Embedding for Face Recognition and Clustering.

The Triplet Loss minimizes the distance between an anchor and a positive, both of which have the same identity, and maximizes the distance between the anchor and a negative of a different identity.

paper info

The same CNN is used to get embeddings of the anchor, positive and negative images and then the triplet loss is calculated.

paper info

For MNIST data, TSNE was used to reduce the dimensionality of embeddings and then the datapoints were projected in low dimensional space.

2D:

paper info

3D:

paper info