Open XiXiRuPan opened 4 years ago
I've read the author's paper and code. I think the author is right. loss_dcd is based on the function "torch.nn.CrossEntropyLoss()". This function already contains "-". So there shouldn't be a "-" before "0.2*loss_dcd"
As for your question to adversarial operation. Pay attention to "step 3" in "main.py".
" groups_2 = [G2, G4] groups_y_2 = [Y2, Y4]" indicates that they only use samples from group 2 and 4. However, "dcd_label=0 if ground_truth==0 else 2" indicates that the label (0 or 2) they used are corresponding to samples from group 1 and 3. So the "loss_dcd" they calculated is just the same adversarial loss shown in their paper.
loss_sum = loss_X1 + loss_X2 + 0.2 * loss_dcd The coefficient of loss_dcd is -0.2, is that right ?