- Use
python2notpython3 - Suppose the current working directory is
$CWD - Suppose the data path is
$DATA_PATH - Suppose the current shell is
bash - Download following
requirements.txtto current working directory - Old version of
cudainstalled(tested onv8.0.44) - Old version of
cudnninstalled(tested on7.0v4.0)
- Install dependencies
pip2 install -qr requirements.txt
- Clone
pylearn2repo to current working directorygit clone git://github.com/lisa-lab/pylearn2.git $CWD/pylearn2 - Change directory
cd $CWD/pylearn2
- Install
pylearn2python2 setup.py develop
- Run following code to see if
pylearn2is installed correctlypython2 -c "import pylearn2"
- Set your data path here
echo export PYLEARN2_DATA_PATH=$DATA_PATH >> ~/.bashrc
- Reload
bashprofilesource ~/.bashrc
- Download possible dataset, using
mnisthere for examplepython2 $CWD/pylearn2/pylearn2/scripts/datasets/download_mnist.py
- Clone
GANrepo to current working directorygit clone git@github.com:goodfeli/adversarial.git $CWD/adversarial - Export
adversarialdirectory to$PYTHONPATHsystem variable,echo export PYTHONPATH=$PYTHONPATH:$CWD/adversarial >> ~/.bashrc
- Reload
bashprofilesource ~/.bashrc
- Check if the system variable
$PYTHONPATHis set correctlypython2 -c "import adversarial"
- Train model and the model should be saved in
$CWD/adversarial/mnist.pklTHEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python2 -m pylearn2.scripts.train $CWD/adversarial/mnist.yaml - Test model
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python2 -m adversarial.parzen_ll -p $CWD/adversarial/mnist.pkl -d mnist -v -s 0.01