Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sugyan/tf-dcgan
- Owner: sugyan
- License: mit
- Created: 2016-05-25T12:22:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-20T02:10:28.000Z (over 7 years ago)
- Last Synced: 2024-07-17T01:54:49.151Z (4 months ago)
- Topics: dcgan, tensorflow
- Language: Python
- Size: 19.5 KB
- Stars: 156
- Watchers: 9
- Forks: 50
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- machine_learning_awesome_zh - sugyan/tf-dcgan: DCGAN implementation by TensorFlow
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 variablesgenerated = sess.run(images)
with open('', 'wb') as f:
f.write(generated)
```### Example ###
- https://github.com/sugyan/face-generator