GithubHelp home page GithubHelp logo

shuxjweb / vat_chainer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from takerum/vat_chainer

0.0 1.0 0.0 728 KB

Implementation of Virtual adversarial training with chainer

License: MIT License

Python 100.00%

vat_chainer's Introduction

Virtual Adversarial training implemented with Chainer(http://chainer.org/)

Python codes for reproducing the results on the SVHN and CIFAR-10 dataset in the paper "Virtual Adversarial Training: a Regularization Method for Supervised and Semi-Supervised Learning" http://arxiv.org/abs/1704.03976

Requirements

python 3.x, chainer 1.22.0, scipy(for ZCA whitening)

Preparation of dataset for semi-supervised learning

On CIFAR-10

python dataset/cifar10.py --data_dir=./dataset/cifar10/

On SVHN

python dataset/svhn.py --data_dir=./dataset/svhn/

Semi-supervised Learning without augmentation

On CIFAR-10

python train_semisup.py --data_dir=./dataset/cifar10/ --log_dir=./log/cifar10/ --num_epochs=500 --epoch_decay_start=460 --epsilon=10.0 --method=vat

On SVHN

python train_semisup.py --data_dir=./dataset/svhn/ --log_dir=./log/svhn/ --num_epochs=120 --epoch_decay_start=80 --epsilon=2.5 --top_bn --method=vat

Semi-supervised Learning with augmentation

On CIFAR-10

python train_semisup.py --data_dir=./dataset/cifar10/ --log_dir=./log/cifar10aug/ --num_epochs=500 --epoch_decay_start=460 --aug_flip=True --aug_trans=True --epsilon=8.0 --method=vat

On SVHN

python train_semisup.py --data_dir=./dataset/svhn/ --log_dir=./log/svhnaug/ --num_epochs=120 --epoch_decay_start=80 --epsilon=3.5 --aug_trans=True --top_bn --method=vat

Semi-supervised Learning with augmentation + entropy minimization

On CIFAR-10

python train_semisup.py --data_dir=./dataset/cifar10/ --log_dir=./log/cifar10aug/ --num_epochs=500 --epoch_decay_start=460 --aug_flip=True --aug_trans=True --epsilon=8.0 --method=vatent

On SVHN

python train_semisup.py --data_dir=./dataset/svhn/ --log_dir=./log/svhnaug/ --num_epochs=120 --epoch_decay_start=80 --epsilon=3.5 --aug_trans=True --top_bn --method=vatent

Evaluation of the trained model

python test.py --data_dir=<path_to_data_dir> --trained_model_path=<path_to_trained_model>

vat_chainer's People

Contributors

takerum avatar

Watchers

James Cloos 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.