Domain Adaptation Representation Learning Algorithm (as published in JMLR 2016)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Domain Adversarial Neural Network (shallow implementation)

This python code has been used to conduct the experiments presented in Section 5.1 of the following JMLR paper.

Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, Victor Lempitsky.
Domain-Adversarial Training of Neural Networks. Journal of Machine Learning Research, 2016.


  • contains the learning algorithm. The fit() function is a very straightforward implementation of Algorithm 1 of the paper.

  • contains an example of execution on the Amazon sentiment analysis dataset (a copy of the dataset files is contained in the folder data). Computes the target test risk (see Table 1 of the paper) and the Proxy-A-Distance (see Figure 3 of the paper).

  • contains the code used to produce Figure 2 of the paper (experiments on the inter-twinning moons toy problem).

  • contains the functions used to generate the mSDA representations (these are literal translations of Chen et al. (2012) Matlab code)