Home

Awesome

Meta-learning with differentiable closed-form solvers.

Paper (published at ICLR 2019)

Please refer to it as:

@inproceedings{
bertinetto2018metalearning,
title={Meta-learning with differentiable closed-form solvers},
author={Luca Bertinetto and Joao F. Henriques and Philip Torr and Andrea Vedaldi},
booktitle={International Conference on Learning Representations},
year={2019},
url={https://openreview.net/forum?id=HyxnZh0ct7},
}

Data setup

$DATASET_PATH
├── miniimagenet
│   ├── data
│   │   ├── n01532829
|   |   |── ...
│   │   └── n13133613
│   ├── splits
│   │   └── ravi-larochelle
|   |   |   ├── train.txt
|   |   |   ├── val.txt
|   |   |   └── test.txt
├── omniglot
|   ...
├── cifarfs 
|   ...

Repo setup (with Conda)

Run

scripts/train/experiments.sh contains all the experiments of the paper (train+eval) in blocks of three lines, e.g.

expm_folder=mini_r2d2 
python run_train.py --log.exp_dir $expm_folder --data.dataset miniimagenet --data.way 16 --model.drop 0.1 --base_learner.init_adj_scale 1e-4 
python ../eval/run_eval.py --data.test_episodes 10000 --data.test_way 5 --data.test_shot 1 --model.model_path ../train/results/$expm_folder/best_model.1shot.t7 
python ../eval/run_eval.py --data.test_episodes 10000 --data.test_way 5 --data.test_shot 5 --model.model_path ../train/results/$expm_folder/best_model.5shot.t7

Note

Some of the files of this repository (e.g. data loading and training boilerplate routines) are the result of a modification of prototypical networks code and contain a statement in their header.