Skip to content

Implementation of the Siamese Neural Networks in PyTorch using MNIST dataset

Notifications You must be signed in to change notification settings

bhiziroglu/Siamese-Neural-Networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PWC

Siamese Neural Networks for One-shot Image Recognition

An implementation of the Siamese Neural Networks in PyTorch, trained and tested on the MNIST dataset.

Requirements

  • 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

Instructions

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.

Results

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.

Train Loss Val Acc

References

About

Implementation of the Siamese Neural Networks in PyTorch using MNIST dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages