This repository contains popular Unsupervised Domain Adaptation (UDA) and related framework implementations in PyTorch. This repository will be frequently updated.
Python3.6
pip install -r requirements.txt
Key idea: Domain Adversarial Training makes the features domain agnostic by using a domain confusion loss. It comprises of three networks: feature extractor, label predictor and domain predictor. The label predictor minimizes the standard supervised loss on the source domain. The domain predictor maximizes the domain confusion on both the source and target domains. This is implemented through a Gradient Reversal Layer (GRL) that performs gradient ascent on the feature extractor with the loss obtained from the domain predictor. Its called adversarial training because this resembles a vanilla GAN training.
Model | SVHN->MNIST | MNIST->MNIST-M |
---|---|---|
Paper Implementation | 73.85 | 76.66 |
This Implementation | 76.13 | 90.95 |
In this implementation, SVHN like architecture (mentioned in the Supplementary Mat) is used for all the experiments.