This is keras implementation of Gated PixelCNN model as proposed in Conditional Image Generation with PixelCNN Decoders.
- Plese let me know if you find any issues or bugs: https://github.com/suga93/pixelcnn_keras/issues
- Version: 2.7.X or 3.4.X
- Version: 1.0.0rc1
- GPU: enabled
- Version: 1.2.2
- graphviz
- scipy==0.18.1
- numpy==1.12.0
- scikit-image==0.12.3
- h5py==2.6.0
- pydot-ng==1.0.0
This repository contains Dockerfile of execution environment. Docker image is registered using automated build.
- [tensorflow/tensorflow:1.0.0-rc1-devel-gpu-py3] (https://hub.docker.com/r/tensorflow/tensorflow/)
- Linux OS
- GPU
- NVIDIA Driver
- Docker
- NVIDIA-Docker
- Install Docker
- Install NVIDIA-Docker
- Get docker image:
docker pull suga93/pixelcnn_keras
- Run docker image:
nvidia-docker run -it suga93/pixelcnn_keras
python3 train_keras_datasets.py -h
python3 train_keras_datasets.py -c configs/sample_train_mnist_small.cfg
python3 train_keras_datasets.py -c configs/sample_train_mnist_small.cfg --conditional True
python3 train_keras_datasets.py -c configs/sample_train_cifar10.cfg
- In this implementation, Keras fails to save model architecture (model.save(), model.to_json(), model.to_yaml()). Therefore, first you need to build same architecture as your trained model.
python3 predict_keras_datasets.py -h
python3 predict_keras_datasets.py -c configs/sample_predict_mnist.cfg --checkpoint_file /path/to/trained_model_mnist.hdf5
python3 predict_keras_datasets.py -c configs/sample_predict_cifar10.cfg --checkpoint_file /path/to/trained_model_cifar10.hdf5