--- library_name: tf-keras --- ## Model description This repo contains the model for the notebook [Image similarity estimation using a Siamese Network with a contrastive loss](https://keras.io/examples/vision/siamese_contrastive/). Full credits go to Mehdi Reproduced by [Rushi Chaudhari](https://github.com/rushic24) [Siamese Networks](https://en.wikipedia.org/wiki/Siamese_neural_network) are neural networks which share weights between two or more sister networks, each producing embedding vectors of its respective inputs. In supervised similarity learning, the networks are then trained to maximize the contrast (distance) between embeddings of inputs of different classes, while minimizing the distance between embeddings of similar classes, resulting in embedding spaces that reflect the class segmentation of the training inputs. ## Dataset [MNIST dataset](https://www.tensorflow.org/datasets/catalog/mnist) of handwritten digits ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: ``` epochs = 10 batch_size = 16 margin = 1 ``` ### Training results ![Contrastive loss](./contrastiveloss.png) ![Accuracy](./accuracy.png)
View Model Plot ![Model Image](./model.png)