A conditional GAN generates handwritten digits on demand. Its discriminator never sees an example on its own — it always receives a pair: the example together with the label it is supposed to go with. It outputs , its estimate that the pair is a genuine one, meaning a real photograph shown with its own correct label.
The training targets follow from that. A pair gets target only if the image is real and the label matches it. Everything else gets target — a generated image, and also a real photograph shown with the wrong label.
The discriminator is a plain binary classifier, so each pair costs
and the batch loss is the average of over the pairs in the batch.
| # | example | label shown to the discriminator | |
|---|---|---|---|
| 1 | real photo of a 3 | 3 | |
| 2 | real photo of a 7 | 7 | |
| 3 | real photo of a 5 | 2 | |
| 4 | generated, asked for a 4 | 4 | |
| 5 | generated, asked for a 9 | 9 | |
| 6 | real photo of a 1 | 8 |
What is the discriminator's average loss over this batch of 6 pairs?
Use natural logarithms and round the answer to 2 decimal places.