floodsung / LearningToCompare_FSL

PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)
MIT License
1.04k stars 268 forks source link

Problem about the feature concatenation #11

Closed cultivater closed 6 years ago

cultivater commented 6 years ago

Thank you for your code. I noticed that before feature concatenation, you sum the feature of support image for each class. Could you please explain why not concatenate every single support image feature to qurey image feature?
I have tried that but the result are not as good as before. You paper didn't refer to that sum operation so I'm puzzled.

floodsung commented 6 years ago

It is just a simple operation to obtain all features. Sum can keep the dimension the same. You can try concatenation too.