Skip to content

gtzheng/L2TT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is the code for the SDM 2023 Paper: Learning to Learn Task Transformations for Improved Few-Shot Classification.

Datasets

Change the values of the two parameters in config.py such that they point to the correct datasets.

Training Script

Metric-based meta-learning:

python main.py --head ProtoNet --network ProtoNet --dataset CIFAR_FS --temp 20.0 --step 3 --save-path ./l2tt_experiments --gpu 0 
  • head could be R2D2, SVM (i.e., MetaOptNet in the paper), ProtoNet
  • network could be ResNet, ProtoNet (i.e., CNN64 in the paper)
  • step is the maximum policy length (corresponding to L in the paper)
  • temp is the sampling temperature (corresponding to $\epsilon$ in the paper)
  • dataset could be miniImageNet or CIFAR-FS

Gradient-based meta-learning

python train_maml.py --network ProtoNet --dataset CIFAR_FS --temp 20 --step 4 --save-path ./l2tt_experiments --gpu 0
  • network could be ResNet, ProtoNet (i.e., CNN64 in the paper)
  • MAML is supported

Citation

Please consider citing this paper if you find the code helpful.

@inproceedings{zhengSDM23learning,
  title={Learning to Learn Task Transformations for Improved Few-Shot Classification},
  author={Zheng, Guangtao and Suo, Qiuling and Huai, Mengdi and Zhang, Aidong},
  booktitle={SIAM International Conference on Data Mining (SDM)},
  year={2023}
}

About

Code for the paper "Learning to Learn Task Transformations for Improved Few-Shot Classification" (SDM23)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages