Sha-Lab / FEAT

The code repository for "Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions"
MIT License
418 stars 84 forks source link

Pretraining hyperparameters for Convnet and Mini Imagenet #53

Closed mayug closed 3 years ago

mayug commented 3 years ago

Hey, Great work. I have been trying to recreate convnet pre-trained weights for mini imagenet.

These are the hyperparameters I used. python pretrain.py --max_epoch 500 --batch_size 128 --lr 0.01 --schedule "350, 400, 440, 460, 480" --gamma 0.1 --backbone_class ConvNet.

I got the following metrics on the 16 way classification on val set. [Dist] best epoch 498, current best val acc=0.2437 [Sim] best epoch 362, current best val acc=0.2490

Using the model_best.pth.tar for 5 way one shot training I am only able to get test accuracy of 52.85 and not anywhere close to 55.

But using the provided con-pre.pth I am able to get test accuracy of 55.

Could you please provide the hyperparameters that you used for Convnet pretraining on Mini ImageNet?

Thanks

Han-Jia commented 3 years ago

Hi,

I use the following commands,

python pretrain.py --lr 0.001 --model conv --schedule 170 300 400 500 --gamma 0.1 --batch_size 128 --max_epoch 800

It gets validation accuracy with distances 0.2572.

RongKaiWeskerMA commented 3 years ago

Hi, Han-Jia

I used the set of hyperparameters you claim before, but I couldn't reproduce the pretrained result. My best validation accuracy is around 0.21

Han-Jia commented 3 years ago

please check whether we use the same data augmentation.

BTW, I use the MiniImageNet dataset from this link.