Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sugyan/tf-dcgan

DCGAN implementation by TensorFlow
https://github.com/sugyan/tf-dcgan

dcgan tensorflow

Last synced: 3 months ago
JSON representation

DCGAN implementation by TensorFlow

Awesome Lists containing this project

README

        

# TensorFlow implementation of DCGAN

### What is DCGAN ? ###

Deep Convolutional Generative Adversarial Networks

- http://arxiv.org/abs/1511.06434

#### Other implementations of DCGAN ####

- https://github.com/Newmu/dcgan_code (Theano)
- https://github.com/soumith/dcgan.torch (Torch)
- https://github.com/mattya/chainer-DCGAN (Chainer)
- https://github.com/carpedm20/DCGAN-tensorflow (TensorFlow)

### Prerequisites ###

- Python >= 2.7 or 3.5
- TensorFlow >= 1.0

### Usage ###

#### Train ####

```python
dcgan = DCGAN()
train_images =
losses = dcgan.loss(train_images)
train_op = dcgan.train(losses)

with tf.Session() as sess:
sess.run(tf.global_variables_initializer())

for step in range(FLAGS.max_steps):
_, g_loss_value, d_loss_value = sess.run([train_op, losses[dcgan.g], losses[dcgan.d]])
# save trained variables
```

#### Generate ####

```python
dcgan = DCGAN()
images = dcgan.sample_images()

with tf.Session() as sess:
# restore trained variables

generated = sess.run(images)
with open('', 'wb') as f:
f.write(generated)
```

### Example ###

- https://github.com/sugyan/face-generator