1
$\begingroup$

For example, consider a dataset like MNIST. I give the conditional vector to produce only the number $7$ for both the generator and discriminator. In the following scenarios, what will the discriminator classify as fake or real:

The generator produces realistic numbers other than $7$, such as a realistic number $9$ ?

The samples from the MNIST dataset that are not the number $7$ (i.e., other numbers) ?

$\endgroup$
1
  • $\begingroup$ Hi @abcd and welcome to AI Stack Exchange! If possible, editing this post to change the title to a specific question may aid in getting answers more quickly. Thank you for posting, and we look forward to more of your questions in the near future! $\endgroup$
    – DeepQZero
    Nov 20, 2023 at 16:00

2 Answers 2

0
$\begingroup$

I assume you mean how to label the image and class inputs since the discriminator can reasonably output either "real" or "fake" labels for either of those inputs, and you generally want to be training with an imperfect discriminator.

In both your scenarios the correct ground truth for training the discriminator is "fake", although it may be better to think of it as "incorrect" in the case of mislabeled real inputs.

You may also reasonably decide not to train with mislabeled real images. They are not necessary, and although they might improve the discriminator training, that's not going to make a difference for the MNIST digits task.

You shouldn't train with deliberately mislabeled generator images, either. If the generator accidentally makes a "1" when you asked it to generate a "7", then you should label ground truth as "fake" for training the discriminator and "real" for training the generator, plus in both cases you should include the attempted "7" as input to the discriminator alongside the generated image

$\endgroup$
9
  • $\begingroup$ I'm actually trying to understand the training process of cGAN and how the discriminator will classify in those cases. That's what I'm trying to ask $\endgroup$
    – user77925
    Nov 21, 2023 at 4:59
  • $\begingroup$ @abcd - what the discriminator's actual output would be? That is covered in the first paragraph. It would not be consistent. $\endgroup$ Nov 21, 2023 at 7:07
  • $\begingroup$ What do you mean by 'not consistent'? Didn't you assign the correct labels to the discriminator in the implementation? For example, images generated by the generator that are not correlated with the conditional vector, no matter how realistic they are, will be considered fake. Similarly, real images from the dataset that are not correlated with the conditional vector will also be considered fake. This is my point $\endgroup$
    – user77925
    Nov 21, 2023 at 9:35
  • 1
    $\begingroup$ @abcd That is what the rest of my answer after para 1 already says - what the target labels are. You then commented that you want to know what the actual output will be. That is different. The discriminator does not immediately output the target output during training. It slowly learns and becomes better at it over time as part of the training process. It is not really possible to predict in advance whether the discriminator's output will be "correct" at any particular stage of training. $\endgroup$ Nov 21, 2023 at 9:49
  • 1
    $\begingroup$ I thought that in the original conditional GAN (cGAN), the discriminator only classified images as fake or real. Does it also verify if the images match the condition label ? $\endgroup$
    – user79662
    Mar 19 at 0:33
0
$\begingroup$

In the first case, I think the discriminator will classify those realistic numbers as real because they look real and can fool the discriminator.

As for the second case, I also think the discriminator will classify them as real because the numbers are from the dataset.

$\endgroup$
0

You must log in to answer this question.