From the course: Introduction to Generative Adversarial Networks (GANs)

How the different models learn

From the course: Introduction to Generative Adversarial Networks (GANs)

How the different models learn

- [Instructor] So how exactly do we train both models in one system? We're looking to train both the discriminator and the generator as part of the same loop, the same process. Let's go back to the diagram that I referenced from that paper earlier, and I have the references all in the notes again. So we mentioned that both the generator and the discriminator, they will learn from the loss of the real or fake metric. So once we pass the data from left to right, the system, we'll be able to take that metric and then update both the weights of the generator and the discriminator. This will actually be done not simultaneously, but basically just at the same time sequentially. We'll actually update the discriminator weights first, and then the generator weights straight after, after every batch of data that's been passed through. When we finish the entire dataset, then we'll get a complete loss metric and we'll be able to use that to compare each run or each epoch of the data that's been pushed through the system to see how well it's improving or if it's still quite volatile. So loss is calculated, again, from the output of this entire pipeline. Both of the models updated from this discrimination, and both models updated together, but apart, so not at the same time, just one after the other, but they're done as part of the same process.

Contents