This is the implementation accompanying paper "The Role of Global Labels in Few-shot Classification and How to Infer Them".

Major dependencies:
1. pytorch
2. hydra (https://github.com/facebookresearch/hydra)
3. Numpy
4. Scikit-Learn

-----------------------

Running the experiments:
1. Download the datasets from https://www.dropbox.com/sh/6yd1ygtyc3yd981/AABVeEqzC08YQv4UZk7lNHvya?dl=0
The default location to read the datasets from is "~/workspace/metaL_data". Change the default setting in the /config folders accordingly.

2. To obtain a standard few-shot model, run

python learn_meta_repr.py

3. To learn a few-shot model using pseudo labels

python learn_labeler.py pretrained_model="name_of_model_from_step_2"

4. To evaluate a trained model
python meta_eval.py pretrained_model="name_of_the_final_model"

------------------------

Default Configurations (/config)
learn_meta_repr.yaml: config for learning standard few-shot models
learn_labeler.yaml: config for obtaining few-shot model using pseudo labels (Ours)
meta_eval.yaml: config for meta-testing

------------------------

Trained models are stored at ./saves