All Projects → yinboc → Prototypical Network Pytorch

yinboc / Prototypical Network Pytorch

Licence: mit
A re-implementation of "Prototypical Networks for Few-shot Learning"

Programming Languages

python
139335 projects - #7 most used programming language

Prototypical Network

A re-implementation of Prototypical Network.

With ConvNet-4 backbone on miniImageNet.

For deep backbones (ResNet), see Meta-Baseline.

Results

1-shot: 49.1% (49.4% in the paper)

5-shot: 66.9% (68.2% in the paper)

Environment

  • python 3
  • pytorch 0.4.0

Instructions

  1. Download the images: https://drive.google.com/open?id=0B3Irx3uQNoBMQ1FlNXJsZUdYWEE

  2. Make a folder materials/images and put those images into it.

--gpu to specify device for program.

1-shot Train

python train.py

1-shot Test

python test.py

5-shot Train

python train.py --shot 5 --train-way 20 --save-path ./save/proto-5

5-shot Test

python test.py --load ./save/proto-5/max-acc.pth --shot 5

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].