Hi @Sneha_K_S, welcome to the GANS specialization!
I’ll take a stab at your questions. Please let me know if I’ve misunderstood what you’re asking on any of these:
In these two assignments, the training loop creates one fake image for training the generator, and one fake image for training the discriminator. These fake images are used in calculating the loss for the generator and discriminator, respectively. The generator creates these images from the noise input. At first, the images the generator creates are just random, but over time as it is trained, it produces better and better images (assuming the model is working well, of course.)
Good question. There is a comment in the first assignment that explains this, but it’s easy to overlook. It’s because the loss function we’re using, BCEWithLogitsLoss, includes the sigmoid function.
The week 2 assignment is basically doing the same thing as week 1 - training a GAN to draw digits using the MNIST database. The main difference is it is using DCGAN (Deep Convolutional GAN) to do it. This is mainly to demonstrate a simple example for you using a more “real-world” GAN (DCGAN). DCGANs have been used for a range of use-cases, from image generation for artists and video game designers, to supporting cancer lesion detection. One of the main useful aspects of DCGAN is its use of convolutional layers - you will be seeing a lot more of those, as well as more examples of use-cases as you continue with the course.