thunlp / FewRel

A Large-Scale Few-Shot Relation Extraction Dataset
https://thunlp.github.io/fewrel.html
MIT License
731 stars 165 forks source link

请问Proto-CNN + Adversarial Training里面的loss_encoder具体用处是什么 #59

Closed fsfwl11406 closed 2 years ago

fsfwl11406 commented 3 years ago

loss_encoder = self.adv_cost(dis_logits, 1 - dis_labels)这行代码的这个loss有什么用

gaotianyu1350 commented 3 years ago

Hi,

这个就是用来训encoder的loss,和它相针对的是discriminator的loss,discriminator只在训练过程中有用(对抗),在测试阶段就丢掉了。