Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
ali
 
 
 
 
 
 
 
 
 
 

LSAL_generator_classifier

This is the code for Loss Sensitive Adversarial Learning with Manifold Margins. The base of the code has been borrowed from ALI [ALI]

Requirements

  • Blocks, development version
  • Fuel, development version

Setup

Clone the repository, then install with

$ pip install -e ALI

Downloading and converting the datasets

Set up your ~/.fuelrc file:

$ echo "data_path: \"<MY_DATA_PATH>\"" > ~/.fuelrc

Go to <MY_DATA_PATH>:

$ cd <MY_DATA_PATH>

Download the CIFAR-10 dataset:

$ fuel-download cifar10
$ fuel-convert cifar10
$ fuel-download cifar10 --clear

Download the SVHN format 2 dataset:

$ fuel-download svhn 2
$ fuel-convert svhn 2
$ fuel-download svhn 2 --clear

Download the CelebA dataset:

$ fuel-download celeba 64
$ fuel-convert celeba 64
$ fuel-download celeba 64 --clear

Training the models

Make sure you're in the repo's root directory.

CIFAR-10

$ THEANORC=theanorc python experiments/LSAL_cifar10.py

SVHN

$ THEANORC=theanorc python experiments/LSAL_svhn.py

CelebA

$ THEANORC=theanorc python experiments/LSAL_celeba_savemargins.py

Evaluating the models

Samples

$ THEANORC=theanorc scripts/sample [main_loop.tar]

e.g.

$ THEANORC=theanorc scripts/sample LSAL_cifar10.tar

Interpolations

$ THEANORC=theanorc scripts/interpolate [which_dataset] [main_loop.tar]

e.g.

$ THEANORC=theanorc scripts/interpolate celeba LSAL_celeba.tar

Reconstructions

$ THEANORC=theanorc scripts/reconstruct [which_dataset] [main_loop.tar]

e.g.

$ THEANORC=theanorc scripts/reconstruct cifar10 LSAL_cifar10.tar

About

Generalized Loss-Sensitive Adversarial Learning implemented in Blocks

Resources

Releases

No releases published

Packages

No packages published

Languages