virajprabhu / CLUE

PyTorch code for Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings (ICCV 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong implementation of DANN

lzhangbj opened this issue · comments

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:

input_dim = self.num_cls

But in original paper, and in every other paper's reimplementation, they follow the illustration below:

Screen Shot 2022-08-25 at 10 39 18 AM

Could you explain why you did this?

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.