-
Run
python omniglot_train.py
, the program will downloadomniglot
dataset automatically. -
For 5-way 1-shot exp., it allocates nearly 3GB GPU memory.
For 5-way 1-shot exp., it allocates nearly 6GB GPU memory.
miniimagenet/
├── images
├── n0210891500001298.jpg
├── n0287152500001298.jpg
...
├── test.csv
├── val.csv
└── train.csv
- modify the
path
inminiimagenet_train.py
:
mini = MiniImagenet('miniimagenet/', mode='train', n_way=args.n_way, k_shot=args.k_spt,
k_query=args.k_qry,
batchsz=10000, resize=args.imgsz)
...
mini_test = MiniImagenet('miniimagenet/', mode='test', n_way=args.n_way, k_shot=args.k_spt,
k_query=args.k_qry,
batchsz=100, resize=args.imgsz)
to your actual data path.
- Run
python miniimagenet_train.py
Model | Fine Tune | 5-way Acc. | 20-way Acc. | ||
---|---|---|---|---|---|
1-shot | 5-shot | 1-shot | 5-shot | ||
Matching Nets | N | 43.56% | 55.31% | 17.31% | 22.69% |
Meta-LSTM | 43.44% | 60.60% | 16.70% | 26.06% | |
MAML | Y | 48.7% | 63.11% | 16.49% | 19.29% |
Ours | Y | 46.2% | 60.3% | - | - |
@misc{MAML_Pytorch,
author = {Liangqu Long},
title = {MAML-Pytorch Implementation},
year = {2018},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/dragen1860/MAML-Pytorch}},
commit = {master}
}