An implementation of the Siamese Neural Networks in PyTorch, trained and tested on the MNIST dataset.
- torchvision==0.5.0
- torch==1.4.0
- numpy==1.16.3
- pytorch_lightning==0.5.3.2
- Pillow==7.0.0
requirements.txt is provided
This project uses PyTorch Lightning which is a lightweight wrapper on PyTorch. This project follows the LightningModule format.
Simply running cpu_run.py or gpu_run.py downloads the MNIST dataset and starts training.
Highest 10-way one-shot accuracy on the held-out test set is 97.5% which is comparable to supervised classification models. Support set is manually picked.