Sha-Lab / FEAT

The code repository for "Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions"
MIT License
418 stars 84 forks source link

some confusion about how to get "aux_center" in feat.py #35

Closed tian0810 closed 4 years ago

tian0810 commented 4 years ago

Hello,I am very interested in your paper. However,When I try to undersatnd contrastive learning in your paper and regularization in your code,I get confused. You construct the prototype by using support and query in the train set,but I think we can only use the support to construct the prototype,because we don't know the label of the query. So could you answer my confusion,thanks!

Han-Jia commented 4 years ago

Hi,

The contrastive loss acts as a kind of regularizer only during meta-training, where we make the set-to-set transformation more discriminative. Only the support set instances are input into the set-to-set transformation during the meta-test.