Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of AutoDIAL: Automatic DomaIN Aignment Layers #21

Open
Lan1991Xu opened this issue Oct 30, 2018 · 3 comments
Open

Implementation of AutoDIAL: Automatic DomaIN Aignment Layers #21

Lan1991Xu opened this issue Oct 30, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request new algorithm Add a new algorithm to the library

Comments

@Lan1991Xu
Copy link

Hi. Thanks for sharing code. I just check:
class salad.layers.da.AutoAlign2d. It seems using original Batchnorm2D, any misunderstanding here.

@stes stes added enhancement New feature or request new algorithm Add a new algorithm to the library labels Oct 30, 2018
@stes
Copy link
Contributor

stes commented Oct 30, 2018

Hi @Lan1991Xu , thanks for flagging this, it is indeed not yet implemented, but it should be straightforward to do so. A similar (or related) functionality (conditional batch norm) was used in the conditional model used in my experiments here. I will think about how to best integrate this in the correct way into salad.

@stes stes self-assigned this Oct 30, 2018
@Lan1991Xu
Copy link
Author

Thanks.Do you means conditional batch norm here. https://github.com/domainadaptation/salad/blob/190e3507d111967c61a8973fcf15d1a9c4e728ce/salad/models/digits/ensemble.py. By the I also check the conditional model you mentioned in the link. It seems it has submit to NIPS workshop. Have you publish on the Arxiv? it would be good I can get access for the paper to better understand. Currently my understand is : it using compute_linear in test after we trained the model. To implement AutoAlign2d, we need calculate mean and variance of each BN by a linear transferform spastic information between the source and target. Is this understanding right. Thanks.

@stes
Copy link
Contributor

stes commented Nov 1, 2018

Thanks.Do you means conditional batch norm here.

Yes, that would be an example on how to use it. Another one (in the context of ResNet for larger images) can be found here.

They way it is implemented so far is by extending the forward function by a domain param, hence the function signature forward(self, x, d). Depending on d, different batch norm statistics will be updated and a different affine transform is used. This functionality is however not yet well integrated into the use with all the implemented domain adaptation algorithms.

By the I also check the conditional model you mentioned in the link. It seems it has submit to NIPS workshop. Have you publish on the Arxiv?

We don't currently have a pre-print available, but I will link the paper once we integrated feedback from the review process, that should be sometime mid-November.

To implement AutoAlign2d, we need calculate mean and variance of each BN by a linear transferform spastic information between the source and target. Is this understanding right. Thanks.

AFAIK, the layer was first proposed here. To break it down:

Regarding the loss functions, the authors use entropy minimization on the target domain, which is already implemented in salad:

image

Regarding the layers, you are right (if I got your comment right):
image

where the different q are mixing distributions:

image

So actually, the algorithm can be straightforwardly implemented, I will see if I find some time in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new algorithm Add a new algorithm to the library
Projects
None yet
Development

No branches or pull requests

2 participants