Skip to content

wjcper2008/DANN-pytorch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DANN (Domain-Adversarial Neural Network) pytorch

Prerequisite

  • python 3.7 (Anaconda)

  • pytorch >= 1.0

  • torchvision >= 0.2.2

Dataset

  • SVHN(Source dataset), MNIST(Target dataset)

  • Download from torchvision

Description

  • DANN.ipynb : DANN model and training algorithm

  • NN.ipynb : Baseline model and training algorithm to compare with DANN

  • The models were trained by 20~30 epochs respectively

  • You can see the graphs of loss and accuracy in ipynb

  • Implementation and Result

  • GRL (Gradient Reversal Layer)
  • 3 Modules (Feature extractor, Classifier, Discriminator)
  • Data preprocessing (Resize 28x28, gray scale, normalization [-1, 1], )
  • 2 Datasets (SVHN, MNIST)
  • Test Accuracy (on MNIST test set)
  • DANN: 70.64 %
  • Baseline model (Source only model): 57.80 %

About

Implementation of DANN with pytorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%