Now that we have prepared our model, it is time to train it, using the following steps:
- Training our GAN model is an iterative process and we will need to create a loop that selects and creates image arrays and then passes them through our GAN, which will calculate the probability that each image array belongs to the target class. However, if we start a loop here, then the effects on every line of code will not be seen until the entire code completes. For that reason, we will first walk through every line of code inside the loop and then, we will show the entire code wrapped in the for loop.
- Before entering the loop, we declare one variable that we will need inside our loop. The following code sets a value for the ...