GitXplorerGitXplorer
r

DCGAN-tf

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
630b22569e4c51c57c9faa0ca0f0ab108d5f4afb

undo fix step count

rroytseng-tw committed 7 years ago
Unverified
0812fd1d90e7063c39e006c879a9a2723ad97ffd

fix step counting

rroytseng-tw committed 7 years ago
Unverified
deb91cf25632f77cf164f2c8ee78c7cf8c041b59

use git lfs on gif images

rroytseng-tw committed 7 years ago
Unverified
5f172b8c10bf5d31c5cc629f965ce5edf40564c1

fix image names

rroytseng-tw committed 7 years ago
Unverified
a1e55cc41abf4c41bf596b1a0fc5ebb455f6a3f1

fix gitignore

rroytseng-tw committed 7 years ago
Unverified
49a1a8302300812ddea34f09b90e2737f6ece26f

add DCGAN code

rroytseng-tw committed 7 years ago

README

The README file for this repository.

DCGAN in Tensorflow with original paper implementation

This implementation use the 'Hook' classes in Tensorflow 1.0.0 or newer, which is really convenient.
In carpedm20's implementation,unbalanced update of G and D is required to get good results. This is most probably due to the way of feeding input batch. In original paper, new z's (random vector) and new real images are sampled for each update of D or G. However, carpedm20 uses the same inputs for a whole update iteration of D and G, that is sampling only once before training D d_step times and then G g_step times.

I implement both training strategies. The original one is refered as strategy1, and carpedm20's is refered as strategy2. By defautl, I use strategy1, but you can explicitly assign it by setting --training_strategy=[1|2].

Prerequisite

Python3
Tensorflow>=1.0.0
Scipy Test

Dataset

This code was tested on celebA. Of course you can try on other datasets.

python download.py celebA

Downloads will put under ./data.

Training

We offer two strategies to train the DCGAN model.

  • Strategy 1 (Just use the default settings)
python main.py 
  • Strategy 2
python main.py --training_strategy=2 --g_step=2 

Testing

Not implement yet.

Training process visualization

Two strategies both produce similar results.

  • Strategy1

    Strategy1

  • Strategy2

    Strategy2

Make training sample images to GIF

python make_gif.py /dir/to/images output_path.gif