This folder contains the code to reproduce Figure 1 in the paper.

*** To use the MiniImageNet dataset, first download it from https://www.kaggle.com/whitemoon/miniimagenet and 
then store it in the data folder, the downloaded file will be automatically processed when calling the 
dataloader for the first time.

# For training a model with different porjection head type
## If want to pre-train with Cifar-100, use config_C100_supce.json, if want miniimagenet, use config_MIN_supce.json
### for projection head type, linear (no proj.), mlp (one layer proj.), mlp2 (two layers proj.), mlp3 (three layers proj.)
python train_separate.py -c <config_C100_supce.json or config_MIN_supce.json>  --head <projection head type (linear or mlp or mlp2 or mlp3)>

# For validating NC metrics of a model
python validate_nc.py --load_path <path to model checkpoint>  --model supce --model_name resnet50 --head_type <projection head type> --val_choice feature --dataset <cifar100 or miniimagenet>

# For doing transfer learning of trained model on cifar10
python transfer_learning_sup.py --load_path <path to model checkpoint>  --model supce --model_name resnet50 --head_type <projection head type> --val_choice feature --dataset cifar10