GithubHelp home page GithubHelp logo

xiangyongcao / decorrelated-adversarial-autoencoder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from patrickgadd/decorrelated-adversarial-autoencoder

0.0 3.0 1.0 436 KB

Tensorflow implementation of Adversarial Autoencoders (with extra option to decorrelate style and classes)

License: Other

Python 100.00%

decorrelated-adversarial-autoencoder's Introduction

decorrelated-adversarial-autoencoder

Tensorflow implementation of Adversarial Autoencoders (with extra option to decorrelate style and classes)

How it works

This is a semi-supervised adversarial autoencoder as described in the original paper by Allreza Makhzani et al (arxiv.org/abs/1511.05644) with the following modification:

I added the possibility to de-correlate the style and class to allow for nice sampling of the style space, and because without this, q(y|X) could be predicted with 60-80% accuracy from q(z|X), meaning that they were heavily correlated and that q(z|X) did not only contain information about the style, but also about the digit in the image, effectively making class-information surpass q(y|X). Adding de-correlation results in that the classifying part of the network only achieve 10% accuracy in predicting q(y|X) from q(z|X), which can be interpreted as there being no correlation at all for the 10 MNIST classes.

Network architecture

(modified version of Figure 8 from the original paper)

Examples

The following examples were generated by a network trained in a semi-supervised fashion on just 10 labelled examples of each of the MNIST-classes, as well as all of the unlabelled training data. The hyperparameters for this training were as in the available source code.

Capturing the style of real examples

Using existing MNIST examples, X, one can feed these through to capture their style q(z | X) and generate all the possible digits from 0 to 9 in the same style.

The first column below contains samples from the MNIST dataset, and each row next to these samples is the network's interpretation of their style applied to the 10 digits:

Capturing of the style of MNIST digits

Sampling the style space

As z, the style space, is an N-dimensional space with values independently distributed as Gaussian distributions with mean 0, and variance 1, this can be sampled and the digits from 0 to 9 can be generated in the same style:

Randomly styled digits, no. 1

Randomly styled digits, no. 2

Randomly styled digits, no. 3

Style-interpolation.

This can be done by sampling two points in z and interpolating linearly (or otherwise) between them:

Interpolation between random styles, no. 1

Interpolation between random styles, no. 2

Interpolation between random styles, no. 3

Interpolation between random styles, no. 4

decorrelated-adversarial-autoencoder's People

Contributors

patrickgadd avatar

Watchers

 avatar  avatar  avatar

Forkers

ai3dvision

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.