by gitabcworld

gitabcworld / FewShotLearning

Pytorch implementation of the paper "Optimization as a Model for Few-Shot Learning"

214 Stars 46 Forks Last release: Not found MIT License 7 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Optimization as a Model for Few-Shot Learning

This repo provides a Pytorch implementation for the Optimization as a Model for Few-Shot Learning paper.

Installation of pytorch

The experiments needs installing Pytorch


For the miniImageNet you need to download the ImageNet dataset and execute the script utils.createminiImagenet.py changing the lines: ``` pathImageNet = '<pathtodownloadedImageNet>/ILSVRC2012imgtrain' pathminiImageNet = '/miniImagenet/'

And also change the main file option.py line or pass it by command line arguments:
parser.addargument('--dataroot', type=str, default='<pathtosaveMiniImageNet>/miniImagenet/',help='path to dataset') ```


$ pip install -r requirements.txt
$ python main.py 


Special thanks to @sachinravi14 for their Torch implementation. I intend to replicate their code using Pytorch. More details at https://github.com/twitter/meta-learning-lstm


  title={Optimization as a model for few-shot learning},
  author={Ravi, Sachin and Larochelle, Hugo},
  booktitle={In International Conference on Learning Representations (ICLR)},


  • Albert Berenguel (@aberenguel) Webpage

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.