This is the code for Loss Sensitive Adversarial Learning with Manifold Margins. The base of the code has been borrowed from ALI [ALI]
Clone the repository, then install with
$ pip install -e ALI
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
Make sure you're in the repo's root directory.
$ THEANORC=theanorc python experiments/LSAL_cifar10.py
$ THEANORC=theanorc python experiments/LSAL_svhn.py
$ THEANORC=theanorc python experiments/LSAL_celeba_savemargins.py
$ THEANORC=theanorc scripts/sample [main_loop.tar]
e.g.
$ THEANORC=theanorc scripts/sample LSAL_cifar10.tar
$ THEANORC=theanorc scripts/interpolate [which_dataset] [main_loop.tar]
e.g.
$ THEANORC=theanorc scripts/interpolate celeba LSAL_celeba.tar
$ THEANORC=theanorc scripts/reconstruct [which_dataset] [main_loop.tar]
e.g.
$ THEANORC=theanorc scripts/reconstruct cifar10 LSAL_cifar10.tar