corenel / pytorch-adda

A PyTorch implementation for Adversarial Discriminative Domain Adaptation
MIT License
473 stars 138 forks source link

Could you verify the implementation? Acc = 11% after domain adaptation #27

Open lindagaw opened 3 years ago

lindagaw commented 3 years ago

=== Evaluating classifier for encoded target domain ===

only source <<< Avg Loss = 14.961788177490234, Avg Accuracy = 56.140000% source and target <<< Avg Loss = 8366.6220703125, Avg Accuracy = 11.350000%

I got accuracy = 11 after domain adaptation.

zzzpc commented 3 years ago

I set d_learning_rate = 1e-3 and c_learning_rate = 1e-5 can get a good result.

source only <<< Avg Loss = 1980.854672080592, Avg Accuracy = 75.000000% domain adaption <<< Avg Loss = 97.09941973184284, Avg Accuracy = 92.903227%

Hcshenziyang commented 2 years ago

I got accuracy = 8 after domain adaptation…… image

ghost commented 2 years ago

Did you solved this issue ? I'am also facing low DA accurcay

yuhui-zh15 commented 2 years ago

See #29

mashaan14 commented 1 year ago

I think what causes the low adaptation accuracy is that the class labels are swapped by the target encoder. This makes sense because it is an unsupervised task and the target encoder didn't see the class labels.

I've used this code on 2D data: https://github.com/mashaan14/ADDA-toy

You can see in the attached image that the target encoder separates the classes well. But the class labels were swapped.

Testing target data using target encoder