GithubHelp home page GithubHelp logo

zhangqianhui / conditional-gan Goto Github PK

View Code? Open in Web Editor NEW
218.0 10.0 86.0 55.96 MB

Tensorflow implementation for Conditional Convolutional Adversarial Networks.

License: MIT License

Python 100.00%
generative-adversarial-network conditional-gan image-generation

conditional-gan's People

Contributors

andrearama avatar deepankar1994 avatar zhangqianhui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

conditional-gan's Issues

IndexError while running operations

Hi, I get the following error while running python main.py --operation 1 , using MNIST dataset.

Traceback (most recent call last):
File "main.py", line 30, in
tf.app.run()
File "/Users/Ido/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "main.py", line 27, in main
, model_path= FLAGS.model_path , visua_path=FLAGS.visua_path)
File "/Users/Ido/Conditional-Gans/model_mnist.py", line 37, in dcgan
data_array , data_y = load_mnist(data_name)
File "/Users/Ido/Conditional-Gans/utils.py", line 48, in load_mnist
y_vec[i, y[i]] = 1
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Any ideas?
Thanks!

Comment on the wrong line

Please see the comment on line

# 10 stand for the num of labels

There is no "10" in the next line of code. Instead this comment belongs to method "dis_net" and it should be just above the line conv1, w1 = conv2d(concat_data, output_dim=10, name='dis_conv1')
where 10 does indeed mean the number of labels.

Why hardcoded constants?

On this line :

d2 = tf.nn.relu(batch_normal(fully_connect(d1, output_size=7*7*2*64, scope='gen_fully2'), scope='gen_bn2'))
instead of 7*7*2*64 there should be c1*c1*2*self.batch_size.

Otherwise, why does this create variables and then neglects to use them?

Generator architecture

As far as I've understood, the architecture of the generator in this implementation mainly consists of two fully-connected layers and two "deconvolutional" ones.
However, in the DCGAN paper, the generator consists of four deconvolutional layers (more correctly would be saying "fractionally-strided convolutions").
Why such choice?

Unable to run this code

i have tried to run your code but it give this error. can you help to solve this problem?

TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.