yue-zhongqi / ifsl

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

Where is the code for function c = g(x, d) in the paper? #2

Closed Kyfafyd closed 3 years ago

Kyfafyd commented 3 years ago

Thanks for amazing work and open source code.

However, I have a question: In supplemental materials, for fine-tuning+IFSL, you calculate c = g(x, d), I wonder where is this function in your code? Thanks very much and looking forward to your reply!

yue-zhongqi commented 3 years ago

Hi! You can check this line where features are split into n parts (feature-wise adjustment) and then concatenated with pre-trained class-wise weighted mean (class-wise adjustment). https://github.com/yue-zhongqi/ifsl/blob/2fc15a8233c9ec30080b9eaed6e9c10dcc85e695/MAML_MN_FT/methods/meta_toolkits.py#L156 The c=g(x,d) is implemented differently under different adjustment strategies.

Kyfafyd commented 3 years ago

Hi! You can check this line where features are split into n parts (feature-wise adjustment) and then concatenated with pre-trained class-wise weighted mean (class-wise adjustment). https://github.com/yue-zhongqi/ifsl/blob/2fc15a8233c9ec30080b9eaed6e9c10dcc85e695/MAML_MN_FT/methods/meta_toolkits.py#L156

The c=g(x,d) is implemented differently under different adjustment strategies.

Thanks very much