Siamese-Network-with-Triplet-Loss

Siamese network is very important concept in NLP and Computer Vision. Here, I've built a siamese network from scratch to get a understanding of how it works.

Two implementations of Siamese Network for "Embedding Model":

  • With Simple Model (with just few stacked Convolutional and Maxpooling layers)
  • Deep Convolution Model with one Inception block in-between.

Here's the few imagesnippets from the code:

Batch of Triplets - Anchor, Positive and Negative

triplets

TSNE result on MNIST using inception model.

TSNE

Requirements:

Tensorflow 2.0, Python 3

Feel free to fork and add your findings.