DCGAN in TensorLayerX

February 7, 2023 ยท View on GitHub

alt tag

Prerequisites

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ You need install TensorLayerX at first!

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ Please install TensorLayerX via source

pip install tensorlayerx

or

pip install git+https://github.com/tensorlayer/tensorlayerx.git 

Usage

First, download the aligned face images from google or baidu to a data folder.

Please place dataset 'img_align_celeba.zip' under 'data/celebA/' by default.

Your directory structure should look like this:

dcgan/
    โ””โ”€โ”€ data.py
    โ””โ”€โ”€ model.py
    โ””โ”€โ”€ train.py
    โ””โ”€โ”€ README.md
    โ””โ”€โ”€ data
          โ””โ”€โ”€ celebA
            โ””โ”€โ”€ img_align_celeba.zip

Second, train the GAN:

$ python train.py

Result on celebA