fungtion / DANN_py3

python 3 pytorch implementation of DANN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to use DANN for a net performing regression instead of classification?

vijayanand-Git opened this issue · comments

Hello @fungtion ,

I have been working on a problem which used CNN and performs regression in the end with the ground truth images.
Now, I want to incorporate DANN into my algorithm (CNN) so that it can withstand the domain variation.
Any suggestion in direction will be helpful.
One more thing, what is the effect of p on the DANN during training. Can I keep it as a fixed value?

hello @fungtion
我想请问output = grad_output.neg() * ctx.alpha代表的是什么意思?

@vijayanand-Git I think applying DANN to help to extract invariant features between different domains will be promising( your 2nd idea), and you can search for the paper about "domain invariant features" to refine your ideas.
p actually helps to incorperate target domain data into training gradually, it should increase with the training. Since images and their labels from source domain are accurate and very helpful to build a class model, so we should give more weight to classidication for extracting discriminative features. And as the training process goes on, we should incorperate more advesarial samples to obtain robust features.

@dreamkily you can find clues in the diagram of the network structure

ok, thank you very much