blue-blue272 / fewshot-CAN

Code of Cross Attention Network for Few-shot Classification (NeurIPS 2019).
208 stars 41 forks source link

some questions about classifier layer for the model #10

Closed whySnowwW closed 4 months ago

whySnowwW commented 4 years ago

Dear auther there is some question in my mind: in the train stage, the num_classes is 64 which is the number of the miniImageNet_train.pickle, however, when i use the test.py to evaluate my model ,the num_classes is still 64 in the model , I'm a little confused about the few shot model's test principle. Thank you for your time reading my issues. Best wishes!

blue-blue272 commented 4 years ago

Our method is based on the prototype network. In the testing phase, the classifier is not used, we only use the feature extractor part.

whySnowwW commented 4 years ago

Thanks for your reply. What is the code test transductive used for? and which is the meta learner in the code, I just find myself troublesome in finding the meta learner part of the model structure

blue-blue272 commented 4 years ago

The test transductive is for the few-shot classification in the transductive setting. You can find the details in the Transductive Inference part of Section 4 in our paper. The meta-learner is the get_attention function in the cam.py, the details can be seen in Meta fusion Layer in Section 3 in our paper.

whySnowwW commented 4 years ago

Sorry to disturb you ,but i still can't find the meta learner part in the code cam.py. Whether it is lying in the part of the def get_attention?

Medallion11 commented 10 months ago

Sorry to disturb you ,but i still can't find the meta learner part in the code cam.py. Whether it is lying in the part of the def get_attention?

i also can not find the meta learner,did you find out now?