CVAE-GAN_tensorlayer
CVAE-GAN_tensorlayer copied to clipboard
A CVAE-GAN implementation with tensorlayer1.x
CVAE-GAN_tensorlayer
A CVAE-GAN implementation with tensorlayer.
Examples
training VAE output
testing VAE output and Recon output
Dependent
tensorflow
tensorlayer
numpy
progressbar2
My test environment is tensorflow-gpu-1.10, tensorlayer-1.91, gtx970m-3g.
Some Problem and Attention
emmm... This implementation may have some differences with the page.
I try WGAN-GP and LS-GAN 's loss, but the result is not good. Maybe my code is wrong.
Then I change discriminator become autoencoder and try BEGAN 's loss, It is look good.
The VAE output after training is still blurry, but I found that the reconstructed image of the discriminator can make the VAE output clearer.
The main network structure is my simple custom resnet, which should be different to DCGAN.
Training Log
My training process output and logs can be found in the imgs and logs folders respectively.
The training log has been compressed and only needs to be decompressed.
How to use
Test
python3 test.py
I uploaded model weights in the repository. You can test with my weight right away.
Test output can be found in the test_output folder.
The upper three lines of each image are the VAE output, and the next three lines are the reconstructed output of the discriminator.
Train
python3 train.py
Just simple start train.py. The train will be start.
It will automatically reuse the previous weights if they are still there.
*.npz files is the networks weight. If you want a new training, just delete them simply.
If you see OOM, try to reduce batch_size or train with cpu.
Page Link
CVAE-GAN: Fine-Grained Image Generation through Asymmetric Training
https://arxiv.org/abs/1703.10155