GithubHelp home page GithubHelp logo

justashu / simplified-dsn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amirhussein96/simplified-dsn

0.0 0.0 0.0 916 KB

Simplified implementation for Domain Seperation Networks

Python 2.28% Jupyter Notebook 97.72%

simplified-dsn's Introduction

Simplified-DSN

This work was officialy added to the TensorFlow GitHub page under Other implementations

https://github.com/tensorflow/models/blob/master/research/domain_adaptation/README.md#other-implementations.

This is a simplified implementation of the popular "Domain Separation Neural Network using Tensorflow. This work is just a humble attempt to simplify the official implementation see "https://github.com/tensorflow/models/tree/master/research/domain_adaptation", since there were several issues reported on the github and I faced them as well. After all it is our duty as engineers and future scientists to make people life easier and better, don't you think so? XD.
The main code parts including loss functions, encoders and the shared decoder were borrowed from the DSN official implementation. Big part of this implementation was inspired by the Domain Adaptation Neural Network official implementatio see "https://github.com/pumpikano".

Requirements

Tested with TensorFlow=1.14.0 and Python 3.6.

DSN_Model

Alt text

MNIST Experiments

The DSN.ipynb notebook implements the MNIST->MNISTM experiments mentioned in the paper. The domain classifier with reversal layer (DANN) is used here as a domain discrepancy loss since it was reported to be better than $MMD^2$. by For more information about DANN check "http://jmlr.org/papers/volume17/15-239/15-239.pdf"

Running the Experiment

Build MNIST-M dataset: MNIST-M dataset consists of MNIST digits blended with random color patches from the BSDS500 dataset. To generate a MNIST-M dataset, first download the BSDS500 dataset and run the create_mnistm.py script:

Results

Method Target acc (paper) Target acc (this repo w/ 30 epochs)
DSN 0.832 0.821

Feature Maps Visualization

Alt text

Decoder Reconstructed Images

Alt text Alt text
Alt text Alt text

Contribution

It would be great to add other experiments to this repository. Feel free to make a PR if you decide to recreate other results from the papers or new experiments entirely.

Contact

In case you faced any issues or found any bugs feel free to contact me at "[email protected]"

simplified-dsn's People

Contributors

amirhussein96 avatar justashu 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.