MCT
MCT copied to clipboard
Pytorch implementation of Meta-Learned Confidence for Few-shot Learning
Meta-Learned Confidence for Few-shot Learining
Pytorch code for following paper:
- Title : Meta-Learned Confidence for Few-shot Learning.[pdf]
- Author : Seong Min Kye, Hae Beom Lee, Hoirin Kim, Sung Ju Hwang
- Previous version : Transductive Few-shot Learning with Meta-Learned Confidence [paper] / [codes]
Abstract

Requirements
- Python 3.6
- Pytorch 1.3.1
Data Download
Training / Testing with inductive manner
- 5-way 1-shot / 5-shot
# 5-way 1-shot MCI(Instance)
$ python train.py --is_train True --gpu 0 --metric instance --transductive False --flip False --drop False --n_shot 1 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric instance --transductive False --flip False --drop False --n_shot 1 --n_train_class 15
# 5-way 5-shot MCI(Instance)
$ python train.py --is_train True --gpu 0 --metric instance --transductive False --flip False --drop False --n_shot 5 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric instance --transductive False --flip False --drop False --n_shot 5 --n_train_class 15
# 5-way 5-shot MCI(Pair)
$ python train.py --is_train True --gpu 0 --metric pair --transductive False --flip False --drop False --n_shot 1 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric pair --transductive False --flip False --drop False --n_shot 1 --n_train_class 15
# 5-way 5-shot MCI(Pair)
$ python train.py --is_train True --gpu 0 --metric pair --transductive False --flip False --drop False --n_shot 5 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric pair --transductive False --flip False --drop False --n_shot 5 --n_train_class 15
Training / Testing with transductive manner
- 5-way 1-shot / 5-shot
# 5-way 1-shot MCI(Instance)
$ python train.py --is_train True --gpu 0 --metric instance --transductive True --flip True --drop True --n_shot 1 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric instance --transductive True --flip True --drop True --n_shot 1 --n_train_class 15
# 5-way 5-shot MCI(Instance)
$ python train.py --is_train True --gpu 0 --metric instance --transductive True --flip True --drop True --n_shot 5 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric instance --transductive True --flip True --drop True --n_shot 5 --n_train_class 15
# 5-way 5-shot MCI(Pair)
$ python train.py --is_train True --gpu 0 --metric pair --transductive True --flip True --drop True --n_shot 1 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric pair --transductive True --flip True --drop True --n_shot 1 --n_train_class 15
# 5-way 5-shot MCI(Pair)
$ python train.py --is_train True --gpu 0 --metric pair --transductive True --flip True --drop True --n_shot 5 --n_train_class 15
$ python train.py --is_train False --gpu 0 --metric pair --transductive True --flip True --drop True --n_shot 5 --n_train_class 15
Acknowledgments
This code is based on the implementation of TapNet, MetaOptNet. And we use the dataset from MetaOptNet.