corenel / pytorch-adda

A PyTorch implementation for Adversarial Discriminative Domain Adaptation
MIT License
474 stars 139 forks source link

why in adapt.py line 91 label_tgt = make_variable(torch.ones(feat_tgt.size(0)).long())? I think label_tgt = make_variable(torch.zeros(feat_tgt.size(0)).long()) #28

Open zzzpc opened 3 years ago

zzzpc commented 3 years ago

cause in line 63 label_tgt = make_variable(torch.zeros(feat_tgt.size(0)).long()) why in line 91 label_tgt changes to torch.ones(feat_tgt.size(0)).long() ?

GuoJingtao-1997 commented 2 years ago

In my view, the target encoder aims to map the target features into the source domain so that we can use the pre-trained source classifier to classify them. Therefore, we would like to make the target label after discriminating close to the source label that is one.