Prototypical Networks

Code for the NIPS 2017 Paper "Prototypical Networks for Few-shot Learning"
Alternatives To Prototypical Networks
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
4 days ago1,962otherC
Convolutional Neural Networks
Awesome Deep Learning Papers21,874
3 years ago34TeX
The most cited deep learning papers
7 days ago12
Must-read papers on graph neural networks (GNN)
4 years ago22
Papers with code. Sorted by stars. Updated weekly.
Keras Gan8,842
9 months ago142mitPython
Keras implementations of Generative Adversarial Networks.
a year ago5
Awesome paper list with code about generative adversarial nets
Gans Awesome Applications4,667
a month ago17
Curated list of awesome GAN applications and demo
Deep Learning Papers2,954
4 years ago5
Papers about deep learning ordered by task, date. Current state-of-the-art papers are labelled.
3 years ago7bsd-3-clausePython
Code and hyperparameters for the paper "Generative Adversarial Networks"
Awesome Speech Recognition Speech Synthesis Papers2,680
5 days ago2mit
Automatic Speech Recognition (ASR), Speaker Verification, Speech Synthesis, Text-to-Speech (TTS), Language Modelling, Singing Voice Synthesis (SVS), Voice Conversion (VC)
Alternatives To Prototypical Networks
Select To Compare

Alternative Project Comparisons

Prototypical Networks for Few-shot Learning

Code for the NIPS 2017 paper Prototypical Networks for Few-shot Learning.

If you use this code, please cite our paper:

  title={Prototypical Networks for Few-shot Learning},
  author={Snell, Jake and Swersky, Kevin and Zemel, Richard},
  booktitle={Advances in Neural Information Processing Systems},

Training a prototypical network

Install dependencies

  • This code has been tested on Ubuntu 16.04 with Python 3.6 and PyTorch 0.4.
  • Install PyTorch and torchvision.
  • Install torchnet by running pip install git+
  • Install the protonets package by running python install or python develop.

Set up the Omniglot dataset

  • Run sh

Train the model

  • Run python scripts/train/few_shot/ This will run training and place the results into results.
    • You can specify a different output directory by passing in the option --log.exp_dir EXP_DIR, where EXP_DIR is your desired output directory.
    • If you are running on a GPU you can pass in the option --data.cuda.
  • Re-run in trainval mode python scripts/train/few_shot/ This will save your model into results/trainval by default.


  • Run evaluation as: python scripts/predict/few_shot/ --model.model_path results/trainval/
Popular Network Projects
Popular Paper Projects
Popular Networking Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Deep Learning
Metric Learning
Nips 2017