• Stars
    star
    468
  • Rank 93,137 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A PyTorch implementation for Adversarial Discriminative Domain Adaptation

PyTorch-ADDA

A PyTorch implementation for Adversarial Discriminative Domain Adaptation.

Environment

  • Python 3.6
  • PyTorch 0.2.0

Usage

I only test on MNIST -> USPS, you can just run the following command:

python3 main.py

Network

In this experiment, I use three types of network. They are very simple.

  • LeNet encoder

    LeNetEncoder (
      (encoder): Sequential (
        (0): Conv2d(1, 20, kernel_size=(5, 5), stride=(1, 1))
        (1): MaxPool2d (size=(2, 2), stride=(2, 2), dilation=(1, 1))
        (2): ReLU ()
        (3): Conv2d(20, 50, kernel_size=(5, 5), stride=(1, 1))
        (4): Dropout2d (p=0.5)
        (5): MaxPool2d (size=(2, 2), stride=(2, 2), dilation=(1, 1))
        (6): ReLU ()
      )
      (fc1): Linear (800 -> 500)
    )
    
  • LeNet classifier

    LeNetClassifier (
      (fc2): Linear (500 -> 10)
    )
    
  • Discriminator

    Discriminator (
      (layer): Sequential (
        (0): Linear (500 -> 500)
        (1): ReLU ()
        (2): Linear (500 -> 500)
        (3): ReLU ()
        (4): Linear (500 -> 2)
        (5): LogSoftmax ()
      )
    )
    

Result

MNIST (Source) USPS (Target)
Source Encoder + Source Classifier 99.140000% 83.978495%
Target Encoder + Source Classifier 97.634409%

Domain Adaptation does work (97% vs 83%).

More Repositories

1

XPS9550-macOS

This repository contains my own files on the installation and configuration of macOS Catalina (10.15) on the Dell XPS 15 (9550)
Rich Text Format
116
star
2

traffic-prediction

Traffic Prediction using LSTM method.
Python
54
star
3

pytorch-arda

A PyTorch implementation for Adversarial Representation Learning for Domain Adaptation
Python
51
star
4

pytorch-atda

A PyTorch implementation for Asymmetric Tri-training for Unsupervised Domain Adaptation
Python
44
star
5

pytorch-glow

PyTorch implementation of "Glow: Generative Flow with Invertible 1x1 Convolutions"
Python
43
star
6

NUC8i7BEH-macOS

My custom configurations for Hackintosh on NUC8i7BEH.
30
star
7

zju-beamer-theme

Beamer theme for oral defense in Zhejiang University.
TeX
20
star
8

ZJUProposal

ZJU LaTeX Proposal Template for Undergraduate.
TeX
17
star
9

yt8m-feature-extractor

Extract features from video file as the format in Youtube-8M
Python
15
star
10

auto-traffic-camera-calib

Code implementation of β€œAutoCalib: Automatic Traffic Camera Calibration at Scale”
Python
13
star
11

ros-randla-net

ROS node for RandLA-Net.
C++
11
star
12

GAN-Zoo

Zoo for GAN and its derivations, implemented by PyTorch.
Python
8
star
13

zju-thesis

LaTeX template for ZJU graduate student.
TeX
7
star
14

QSC-Video-Tutorial

A tutorial for members of QSC Video team.
GCC Machine Description
6
star
15

yolov3-tensorrt

A fork of the `yolov3_onnx` sample in TensorRT.
Python
4
star
16

Z270-HD3-macOS

My configurations and files for macOS 10.13.6 with Z270-HD3 and i7-6700K
Rich Text Format
4
star
17

torchsharp

A set of sharp utilities for PyTorch.
Python
4
star
18

YUV2JPG

Convert `.yuv` image file to `.jpg` image file.
MATLAB
3
star
19

ip-camera-ehome-server

EHome server for Hikvision IP camera.
C++
3
star
20

rknn-model-tools

High-level library to help with using RKNN models.
Python
3
star
21

slurm-examples

Exmaples for running various jobs with Slurm.
Python
3
star
22

walkman-utils

Utilities for Sony Walkman players.
Python
3
star
23

ctypes-example

A simple example for calling C++ functions in Python by `ctypes`.
Python
3
star
24

walkman-lyrics

A tiny script to download lyrics for Walkman.
Python
2
star
25

white-balancer

Calibrate and correct white balance of images.
Python
2
star
26

torchzoo

Zoo of models and datasets for PyTorch.
Python
2
star
27

env-setup

Setup environment for my computers.
Shell
2
star
28

pytorch-starter-kit

A demo project and quick starter kit for PyTorch.
Python
2
star
29

corenel.github.io.bak

Hexo blog
HTML
2
star
30

gitea-server

Configurations and scripts for self-built gitea server.
Python
2
star
31

image-stitching

A playground for testing image stitching algorithms.
C++
1
star
32

dotfiles

My dotfiles for both macOS and Ubuntu.
Shell
1
star
33

course-notes

Notes for my courses.
TeX
1
star
34

modern-python-project

An example for building a modern python project.
Python
1
star
35

udp-video-streaming

Simple project for streaming video frames by UDP.
C++
1
star
36

jetnet-wrapper

Wrapper for jetnet.
C++
1
star
37

matlab-socketio

A tiny bridge between Matlab and Socket.io server.
MATLAB
1
star
38

lintcode

LintCode Problems' Solutions
Python
1
star
39

gdoc-latex-template

LaTeX template for general purpose documents.
TeX
1
star
40

leetcode

LeetCode Problems' Solutions
Python
1
star
41

Notes-for-ML

Notes and homework for Machine Learning in Coursera
MATLAB
1
star
42

silent-screenshot

Take screenshot silently.
Python
1
star
43

gst-snoop-pipe

Read, process and display stream by GStreamer and OpenCV.
C++
1
star
44

ns-album-exif

Add original capture time EXIF for screenshots from nintendo switch.
Python
1
star
45

flambeau

Collection of useful functions and utilities from my production practice.
Python
1
star
46

pytorch-docker

Docker image for PyTorch
Dockerfile
1
star
47

autohome-image-spider

Spider for downloading images from autohome.
Python
1
star
48

MultiAgentAStar

A Multi-agent A* algorithm with collision avoidance.
C++
1
star
49

nowcoder

Solution for problems and exercises in nowcoder.
Python
1
star