Skip to content
Implementation of "A Simple Neural Attentive Meta-Learner" (SNAIL, in PyTorch
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix the base of log Jul 6, 2019 Miniimagenet code Jul 2, 2018

A Simple Neural Attentive Meta-Learner (SNAIL) in PyTorch

An implementation of Simple Neural Attentive Meta-Learner (SNAIL) (paper) in PyTorch.

Much of the boiler plate code for setting up datasets and what not came from a PyTorch implementation of Prototypical Networks.

Mini-Imagenet Dataset

Follow the instructions here: to download the mini-imagenet dataset.


Below are the following attempts to reproduce the results in the reference paper:


Model 1-shot (5-way Acc.) 5-shot (5-way Acc.) 1 -shot (20-way Acc.) 5-shot (20-way Acc.)
Reference Paper 99.07% 99.78% 97.64% 99.36%
This repo 98.31%* 99.26%** 93.75%° 97.88%°°

* achieved running python --exp omniglot_5way_1shot --cuda

* achieved running python --exp omniglot_5way_5shot --num_samples 5 --cuda

* achieved running python --exp omniglot_20way_1shot --num_cls 20 --cuda

* achieved running python --exp omniglot_20way_5shot --num_cls 20 --num_samples 5 --cuda


In progress. Writing the code for the experiments should be done soon but the main bottleneck in these experiments for me is compute, if someone would be willing to run and report numbers that would be much appreciated.


In progress.

You can’t perform that action at this time.