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

about the feature #12

Closed 96091165 closed 2 years ago

96091165 commented 2 years ago

Hello, I have a question about the feature.

Why do the inductive and transductive use the same feature?

I thought they were using different ways to train cause the testing set had only been used in transductive learning, not inductive learning.

Thanks.

ybendou commented 2 years ago

Hello,

The training of the backbone is the same for the inductive and transductive settings, it's the same backbone for both. The difference is when doing few-shot evaluation, where in transductive the other queries features are taken into account without their labels. In the inductive setting we only have access to each query individually without any knowledge on the other queries. You can refer to the paper for more details or the code ( inductive and transductive ). The testing set has both inductive and transductive options. Please refer to the README.

For inductive EASY :

$ python main.py --dataset-path "<dataset-path>" --dataset miniimagenet --model resnet12 --test-features "[<path>/minifeaturesAS1.pt11, <path>/minifeaturesAS2.pt11, <path>/minifeaturesAS3.pt11]" --preprocessing ME --n-shots 1

For transductive EASY :

$ python main.py --dataset-path "<dataset-path>" --dataset miniimagenet --model resnet12 --test-features "[<path>/minifeaturesAS1.pt11, <path>/minifeaturesAS2.pt11, <path>/minifeaturesAS3.pt11]" --postrocessing ME --transductive --transductive-softkmeans --transductive-temperature-softkmeans 5 --n-shots 1

96091165 commented 2 years ago

I got it, thank you very much.