Implementation of a DCGAN to generates faces, trained with the celebA dataset.
For the CUDA version, you need:
- GCC 8.0 or later
- Cuda 9.2
- At least 2.4GB of memory (GPU)
You need to download the celebA dataset. (next section)
./bootstrap
cd _build
make
You need to dowload the celebA dataset and to put it at ./celebA. Then run:
cd _build
python ../dcgan/preprocess.py
This command scales all the dataset, it might takes some time.
cd _build
RT_MODE=<mode> ./dcgan
Options:
- --model : load a pretrained model if the file exists, and save the model during training
- --train : train the network for several epochs
- --generate : generate a sample of faces and save it to a jpg file
There is a pretrained model:
RT_MODE=GPU ./dcgan --generate visages.jpg --model ../models/pretained.tbin
To switch between the CPU/GPU execution, binaries must be run with:
RT_MODE=<mode> ./bin
Available modes:
- CPU: monothreaded on CPU, default value
- MCPU: multihreaded on CPU
- GPU: cuda version
cd _build
make check
Launch the MNIST classifier:
cd _build
RT_MODE=<mode> ./nn_mnist mnist.data
Basic network with dense layers, softmax cross entropy, and adam optimizer.