Is it an error when train the generator in Chapter7 SGAN ?
WendyMin opened this issue · 2 comments
WendyMin commented
The original code is:
# Train Generator
g_loss = gan.train_on_batch(z, np.ones((batch_size, 1)))
But the generator generates fake images, so I think the input of gan.train_on_batch is fake=np.zeros((batch_size, 1))
# Train Generator
g_loss = gan.train_on_batch(z, np.zeros((batch_size, 1)))
youngsend commented
The original code is correct, because during Generator training, we want to fool the Discriminator.
WendyMin commented
Thanks. You are absolutely right.