VisionLearningGroup / DANCE

repository for Universal Domain Adaptation through Self-supervision
MIT License
122 stars 20 forks source link

Architecture for DANN #1

Closed rangwani-harsh closed 3 years ago

rangwani-harsh commented 3 years ago

Dear authors, Thanks for the code release. I was curious about the fact that accuracy of method DANN (in closed set for office 31) reported in the paper is much higher than accuracies reported for it in other papers like CDAN. So I wanted to know what architecture was used for the classifier and discriminator network along with other hyperparams for your DANN implementation.

Thanks

ksaito-ut commented 3 years ago

Hi, thanks for your interest in our work.

For classifier (C), we used the same architecture as DANCE. I guess it may improve performance. For the feature extractor, we added one linear layer (nn.Linear(2048, 2048)) on top of ResBase. Discriminator was a two-layered model (fc1 = nn.Linear(input_size, 1024), fc2 = nn.Linear(1024, 1)), ReLU was used in fc1.
The loss was computed as follows. d_s and d_t are the output of discriminator for source and target respectively.

dloss_s = torch.mean(d_s 2) dloss_t = torch.mean((1 - d_t) 2)

We did not apply learning rate scheduling for discriminator.

rangwani-harsh commented 3 years ago

Thanks for the detailed answer. So the discriminator lr used is 0.01 for all the iterations?

ksaito-ut commented 3 years ago

No. Sorry for the confusion. The learning rate is scheduled as is done for feature extractor and classifier.

rangwani-harsh commented 3 years ago

Thanks a lot 👍