yue-zhongqi / ifsl

[NeurIPS 2020] Released code for Interventional Few-Shot Learning
164 stars 23 forks source link

How to plug and play #6

Open yifanliuying opened 3 years ago

yifanliuying commented 3 years ago

sorry for my poor program level, I can not replay this code,I try to replay the four files code but all fail. Besides, I read the code but I do not know which part of the code implements feature intervention and which part implements class intervention, so I do not know how to plug and play in another moedls.Has anyone done it? can you help me? Thank you very much.

yue-zhongqi commented 2 years ago

Hi, Did you download the necessary datasets and packages? A good place to understand the code is MAML_MN_FT/methods/DMAML.py. For feature-wise adjustment, set n_splits>1 and use_x_only=True. For class-wise adjustment, set n_splits=1, classifier=single, use_x_only=False and d_feature=ed. For combined adjustment, set n_splits>1 and follow class-wise adjustment.