sicara / easy-few-shot-learning

Ready-to-use code and tutorial notebooks to boost your way into few-shot learning for image classification.
MIT License
1.03k stars 141 forks source link

How to use MatchingNetworks or RelationNetworks? #111

Closed ShraaboniSarker closed 1 year ago

ShraaboniSarker commented 1 year ago

How to use MatchingNetworks for classical training? I replaced the PrototypicalNetwork with MatchingNetwork in the training but i am getting this error "init() missing 1 required keyword-only argument: feature_dimension'". But it should get the dimension value from FewShotClassifier. I might be wrong. Please give me some guidance. Same for RelationNetwork.

ebennequin commented 1 year ago

Hi! Matching Networks and Relation Networks need an extra argument feature_dimension because they use an additional module on top of the feature space. In __init__(), we initialize this module, therefore we need the feature dimension.

ShraaboniSarker commented 1 year ago

I got it later on. Solved it 2 days ago but forgot to update in the ticket. Thanks. Btw I am trying to implement the SimpleShot and is there any sample code snippet for that which will help me with the implementation?

ebennequin commented 1 year ago

SimpleShot is included in easyfsl (source).