Giter Site home page Giter Site logo

conditional-dcgan-keras's People

Contributors

jacobgil avatar jacobsagivtech avatar laoluzi avatar r0nn13 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

Watchers

 avatar  avatar  avatar

conditional-dcgan-keras's Issues

How to change the image sizes?

Hi,

Thanks for sharing! and I have two questions,
-I have 2 classes and for each one 2k images with same size 250x250, I wont to resize them but I get error, How come over with this???

  • I would like to generator just give me one images with the size not concatinating the small size in one image, How can I do that?

Thanks in Advance,
Maryam

Error in mergin

Hi,
I've got an error related to the merge part of generative network:
"
ValueError: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 1024, 2, 512), (None, 512, 2, 2)]
"
Is a bug in you code?
beside this I've got an error for using "mode" in "BatchNormalization"

BatchNormalization(mode=2) on keras 2.1.5

In the sampled code for the keras implementation in the generator there is the batchnormalization step that it is coded as follow:

e1 = BatchNormalization(mode=2)(e1)

However, when the mode = 2 then there is an emerging error from keras. I noticed that when i set the mode=0 the whole thing is working. However, what it the difference between mode=2 and mode =0. And if it is crucial difference how can I have mode = 2. I guess that error has to do with the keras version (I am using keras 2.1.5).

Add class information of the images into the loss function

Is it possible to take into account as a conditional information also the actual labels of the image 2 image translation? As I understood my input image Xa from the a belongs to A domain is transformed and mapped to Xb where b belongs to B domain and also Xb belongs to X_train while the Xa belongs to y_train. Is it possible to add the actual classes of the X_a and X_b into the loss function of the discriminator?

Discriminator loss function

I am trying to understand the loss function of discriminator:

  `def discriminator_loss(y_true,y_pred):
              return K.mean(K.binary_crossentropy(K.flatten(y_pred), K.concatenate([K.ones_like(K.flatten(y_pred[:BATCH_SIZE,:,:,:])),K.zeros_like(K.flatten(y_pred[:BATCH_SIZE,:,: :])) ]) ), axis=-1)`

I am wandering why the y_true is not used at all and only y_pred is used twice. Is it kind of mistake? They way that the discriminator is trained is:

 `# Training D:
 real_pairs = np.concatenate((X_train[index * BATCH_SIZE:(index + 1) * BATCH_SIZE, :, :, :], image_batch),axis=1)
 fake_pairs = np.concatenate((X_train[index * BATCH_SIZE:(index + 1) * BATCH_SIZE, :, :, :], generated_images), axis=1)

  X = np.concatenate((real_pairs, fake_pairs))
  y = np.concatenate((np.ones((BATCH_SIZE, 1, 64, 64)), np.zeros((BATCH_SIZE, 1, 64, 64))))
  d_loss = discriminator.train_on_batch(X, y)`

Is it that I need to add also the y_true in the discriminator or no?

Error in merging layers

Hello, first I was using keras 2.0. Then i realized thousands of things have changed in 2.0. So I downgrade keras to 1.0.8. Now I am getting the following error.

Exception: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 512, 1, 1), (None, 512, 2, 2)]

Is there any problem in your code? Or is it some kind of version problem?

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.