ybendou / easy

This repository is the official implementation Ensemble Augmented-Shot Y-shaped Learning: State-Of-The-Art Few-Shot Classification with Simple Ingredients.
MIT License
112 stars 18 forks source link

cannot reproduce the performance of 3xResNet12 #16

Closed LIUZIJING-CHN closed 2 years ago

LIUZIJING-CHN commented 2 years ago

Excuse me, I have followed the command of training a ResNet12 with the followings: python main.py --dataset-path ' ' --dataset miniimagenet --model resnet12 --epochs 0 --manifold-mixup 500 --rotations --cosine --gamma 0.9 --milestones 100 --skip-epochs 450 --batch-size 128 --preprocessing ME --save-model "result/official/mini1.pt" --n-shot [1,5] which is the same as the one you provided. But I can only reach the accuracy of 64 of each backbone, and after I ensembled the features the accuracy can only reach 65. The features I downloaded from OneDrive can have an accuracy of around 70 for each, which is far beyond mine. Hope you can solve my problem, thx!

ybendou commented 2 years ago

Hello,

Sorry for the delayed answer, did you manage to fix it? That is indeed weird, without 'AS' component I reach 68% if you add --sample-aug 20 (for AS) I reach 70% performance for one backbone.

Otherwise, can you try the following command?

python main.py--dataset-path ' ' --dataset miniimagenet --model resnet12 --milestones 300 --epochs 0 --manifold-mixup 1500 --cosine --gamma 0.9 --rotations --batch-size 128   --preprocessing "ME" --dataset-size 12800 --skip-epochs 1450 --deterministic  --save-features "minifeatures.pt" --sample-aug 20

I'm not exactly sure where the difference might come from, as 4% difference is quite large.

LIUZIJING-CHN commented 2 years ago

Thx for your reply, I have resolved this problem. After I upgraded the version of pytorch, everything goes well. Maybe it has something to do with that.

ybendou commented 2 years ago

Glad to know it works, I'm not sure what went wrong with the versioning. Best,