Giter Club home page Giter Club logo

adda's Introduction

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.

adda's People

Contributors

erictzeng avatar jhoffman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.