mingyuliutw / UNIT

Unsupervised Image-to-Image Translation
Other
1.98k stars 360 forks source link

Question about code for minimizing the L1 distance between features for Domain Adaptation #41

Closed hsm207 closed 6 years ago

hsm207 commented 6 years ago

In page 7 of the paper, it says:

Also, for a pair of generated images in different domains, we minimized the L1 distance between the features extracted by the highest layer of the discriminators...

And in the code in cocogan_trainer_da,py, this is implemented as follows:

    dummy_variable = Variable(torch.zeros(fake_feat_aa.size()))
    feature_loss_a = self._compute_ll_lloss(fake_feat_ab - fake_feat_aa, dummy_variable)
    feature_loss_b = self._compute_ll_loss(fake_feat_ba - fake_feat_bb, dummy_variable)

Isn't this L2 loss because self._compute_ll_loss is implemented usingtorch.nn.MSELoss()?

mingyuliutw commented 6 years ago

Thanks for reporting. This is a typo in the paper. Will fix it in the nips final version.