xiangjjj / implicit_alignment

Code for ICML2020 "Implicit Class-Conditioned Domain Alignment for Unsupervised Domain Adaptation"
Other
90 stars 10 forks source link

Excuse me, I am a beginner, I am very interested in your work and have some questions #4

Closed beiyangxiaolaodi closed 3 years ago

beiyangxiaolaodi commented 3 years ago

I have noticed that for different data sets, the --train_steps are different. How to determine the specific training steps if i use my dataset? And I didn’t see the training epoch ? Thanks very much! I am looking forword to your reply!

xiangjjj commented 3 years ago

The training epoch can be equivalently converted to train_steps by train_steps / number of steps per epoch. I do not have a particular reason to prefer train_steps over epochs.

As to how to set train_steps for a new dataset, I think it is more of trial and error since it is a hyper-parameter of the model. What I observed before is that more adaptation steps do not hamper the performance of the target domain. If you have multiple domains in your dataset, you could use one domain pair to select hyper-parameters for the remaining domain pairs.

beiyangxiaolaodi commented 3 years ago

Thanks very much! I have multiple domains in my dataset and I set the train_steps to 10000 the Acc is 0.6624 then I set the train_steps to 40000 the Acc is 0.6629 ,it seems that you are right 。

  1. I wonder if i could employ your implicit alignment to other UDA method ?

  2. And i am not sure about “use one domain pair to select hyper-parameters for the remaining domain pairs” ?

  3. I am not sure about the parameter k-shots? thank you very much for your generous answer!

xiangjjj commented 3 years ago

I wonder if i could employ your implicit alignment to other UDA method ?

I think it works best if the dataset is imbalanced and has many classes. I found it could also improve DANN, mutual information, and in some cases VAT.

And i am not sure about “use one domain pair to select hyper-parameters for the remaining domain pairs” ?

There are many hyperparameters, such as learning rate, and you could try different ones on one domain pair, and use it on other domain pairs for the same dataset.

I am not sure about the parameter k-shots?

n-way and k-shots are constrained by the batch size. Suppose the batch size is 24 and the number of classes is 48. One way to construct batches is to sample 24 classes with 1 example per class, i.e., k-shot=1; another way is to sample 12 classes with 2 examples per class. This is a tradeoff between class diversity and the number of examples per class. Note, n-way * k-shot should be equal to the batch size.

beiyangxiaolaodi commented 3 years ago

Thanks a lot for your reply! I am gonna use your idea to do some retrieval tasks ~ could you please give me some advices to pay attention to?Please do not close this issue in case I have some questions in the future~ THANKS A LOT !

xiangjjj commented 3 years ago

I know very little about retrieval. Good luck with your endeavors!