Need help with adda?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

erictzeng
209 Stars 75 Forks 26 Commits 13 Opened issues

Services available

!
?

Need anything else?

Contributors list

# 15,532
Shell
C++
MATLAB
Jupyter...
24 commits
# 199,709
Python
Shell
MATLAB
Jupyter...
1 commit

Adversarial Discriminative Domain Adaptation

Getting started

This code requires Python 3, and is implemented in Tensorflow.

Hopefully things should be fairly easy to run out of the box:

pip install -r requirements.txt
mkdir data snapshot
export PYTHONPATH="$PWD:$PYTHONPATH"
scripts/svhn-mnist.sh

The provided script does the following things:

  • Train a base LeNet model on SVHN (downloading SVHN under
    data/svhn
    in the process)
  • Use ADDA to adapt the SVHN model to MNIST (downloading MNIST under
    data/mnist
    in the process)
  • Run an evaluation on MNIST using the source-only model (stored at
    snapshot/lenet_svhn
    )
  • Run an evaluation on MNIST using the ADDA model (stored at
    snapshot/adda_lenet_svhn_mnist
    )

Areas of interest

  • Check
    scripts/svhn-mnist.sh
    for hyperparameters.
  • The LeNet model definition is in
    adda/models/lenet.py
    .
  • The model is annotated with data preprocessing info, which is used in the
    preprocessing
    function in
    adda/models/model.py
    .
  • The main ADDA logic happens in
    tools/train_adda.py
    .
  • The adversarial discriminator model definition is in
    adda/adversary.py
    .

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.