-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
labels as input to cgan combined model #105
Comments
the G model needs two inputs(noise and condition),and D model needs what G generates and the label(what number G model generates) |
Thanks CreeperGo. I understand your meaning. But I don't think the label feeding to Discriminator should be generated by Generator. Labels feeding to Discriminator should be as same as those to Generator. It is cited in '3.2 Conditional AdversarialNets' of the Paper via https://arxiv.org/abs/1411.1784, So, y should be the same one feeding into both the discriminator and generator. Right? |
nope. |
GAN: [noise] -> G;[generated samples,true samples]->D; |
Hi @CreeperGO. The discriminator evaluates whether the image samples are valid examples of the digit labels which it also receives as inputs. The randomly sampled labels which the generator tries to generate are fed to the discriminator together with the generator samples, where the generators objective is to have those samples being labeled as valid given the digit labels. Hope this clarifies. |
Hi @eriklindernoren! Thanks for your interpretation. However, I have the same question as @zhchyang2004 issued. I have seen several CGAN implementations. There are two ways to use the condition labels:
Here are my questions:
|
Regarding the parameter on Line 152 in Keras-GAN/cgan/cgan.py, does it make more sense to replace the input 'sampled_labels' with 'labels' defined in Line 131?
Line 131:
imgs, labels = X_train[idx], y_train[idx]
Line 152:
g_loss = self.combined.train_on_batch([noise, sampled_labels], valid)
It is desired and appreciated to get your idea on it.
The text was updated successfully, but these errors were encountered: