corenel / pytorch-adda

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

Question about the loss #16

Open taylover-pei opened 5 years ago

taylover-pei commented 5 years ago

You have done a great work! But I have some questions about the loss function. I have no idea where is the advarsarial loss in the code? You used the nn.LogSoftmax() in the adapt.py, and then used the nn.CrossEntropyLoss() in the main.py to train the discriminator. As we know, the nn.CrossEntropyLoss() combines nn.LogSoftmax() and nn.NLLLoss() in one single class, so is this use not repeated? And other question is the nn.CrossEntropyLoss() and the nn.LogSoftmax() is equivalent to the advarsarial loss? Thank you very much! Looking forward to your reply!

taylover-pei commented 5 years ago

And also how about the BCELoss?