jacobgil / keras-dcgan

Keras implementation of Deep Convolutional Generative Adversarial Networks
974 stars 413 forks source link

Potential label error? #11

Closed mynameisvinn closed 7 years ago

mynameisvinn commented 7 years ago

since we're training discriminator_on_generator with noise, shouldnt the corresponding label data be a string of 0s instead of 1s?

for i in range(BATCH_SIZE):
   noise[i, :] = np.random.uniform(-1, 1, 100)
g_loss = discriminator_on_generator.train_on_batch(noise, [1] * BATCH_SIZE)  # shouldnt this be [0] * BATCH_SIZE?

thanks!

keelinm commented 7 years ago

It should be a string of 1s. You tell the GAN that the incoming data is "real" in order to drive the weights of the generator towards creating a real looking image from the noise. The weights of the discriminator are not changing during this training.

mynameisvinn commented 7 years ago

thanks @keelinm!