Wrong implementation of DANN
lzhangbj opened this issue · comments
Lin Zhang commented
Hi, I realized that you have used the wrong implementation of DANN(revgrad). Specifically, you attach the discriminator after the classifier instead of the penultimate layer. see here:
CLUE/adapt/models/adapt_net.py
Line 49 in 99cb2b4
But in original paper, and in every other paper's reimplementation, they follow the illustration below:
Could you explain why you did this?
Viraj Prabhu commented
Thanks for pointing this out. My understanding is that either choice is valid for eg. https://github.com/jhoffman/cycada_release/blob/master/cycada/models/adda_net.py#L33 also attaches the discriminator after the logits. Empirically, I have found both to work similarly.