Giter Club home page Giter Club logo

adversarial-autoencoder-classifier's Introduction

Non Parametric Classification with Advesarial AutoEncoders ============ PyTorch implementation of Non-parametric Unsupervised Classification with Adversarial Autoencoders.

Shahar Azulay

Python27_ Python35_ License_ PyTorch_

Documentation_

image

[1] A.Makhzani, J.Shlens, N.Jaitly, I.Goodfellow, B.Frey: Adversarial Autoencoders, 2016, arXiv:1511.05644v2

Usage Examples:

Install the module

>>> python setup.py install --user

Initialize the Datasets

>>> init_datasets --dir-path <path-to-data-dir>

Train a new AAE in an Semi-Supervised setting

>>> train_semi_supervised --dir-path <path-to-data-dir> --n-epochs 35 --z-size 2 --n-classes 10 --batch-size 100 loading data started... dataset size in use: 3000 [labeled trainset] 47000 [un-labeled trainset] 10000 [validation] using configuration: {'learning_rates': {'auto_encoder_lr': 0.0008, 'generator_lr': 0.002, 'discriminator_lr': 0.0002, 'info_lr': 1e-05, 'mode_lr': 0.0008, 'disentanglement_lr': 0}, 'model': {'hidden_size': 3000, 'encoder_dropout': 0.2}, 'training': {'use_mutual_info': False, 'use_mode_decoder': False, 'use_disentanglement': True, 'use_adam_optimization': True, 'use_adversarial_categorial_weights': True, 'lambda_z_l2_regularization': 0.15}} current epoch:: [ =================== ] 99.79% ...

image

Train a new AAE in a Fully Unsupervised setting

>>> train_unsupervised --dir-path <path-to-data-dir> --n-epochs 35 --z-size 2 --n-classes 10 --batch-size 100 loading data started... dataset size in use: 3000 [labeled trainset] 47000 [un-labeled trainset] 10000 [validation] ...

Visualize a trained model using pre-defined visualizations

>>> generate_model_visualization --dir-path <path-to-data-dir> --model-dir-path {<path-to-model-dir> --mode unsupervised --n-classes 10 --z-size 5 loading data started... dataset size in use: 3000 [labeled trainset] 47000 [un-labeled trainset] 10000 [validation] Label 1: 40.2%, Best matching label; 20 Label 2: 41.9%, Best matching label; 14 Label 3: 33.0%, Best matching label; 4 Label 4: 41.1%, Best matching label; 2 Label 5: 53.8%, Best matching label; 11 Label 6: 44.3%, Best matching label; 26 Label 7: 48.6%, Best matching label; 6 Label 8: 47.6%, Best matching label; 0 Label 9: 40.1%, Best matching label; 22 ACCURACY: 0.85% ...

image

Control the model and training hyper-parameters using a YAML configuration file

>>> train_unsupervised --dir-path <path-to-data-dir> --config-path <path-to-configuration-file> --n-epochs 35 --z-size 2 --n-classes 10 --batch-size 100

adversarial-autoencoder-classifier's People

Contributors

shaharazulay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pjb7687 jin-hy

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.