Step-By-Step Implementation of GANs on Custom Image Data in PyTorch: Part 2
In Part 1 on GANs, we started to build intuition regarding what GANs are, why we need them, and how the entire point behind training GANs is to create a generator model that knows how to convert a random noise vector into a (beautiful) almost real image. Since we have already discussed the pseudocode in great depth in Part 1, be sure to check that out as there will be a lot of references to it! In case you would like to follow along, here is the Github Notebook containing the source code for training GANs using the PyTorch framework. The whole idea behind training a GAN network is to obtain a Generator network (with most optimal model weights and layers, etc.) that is excellent at spewing out fakes that look like real! Note: I would like to take a moment to truly appreciate Nathan Inkawhich for writing a superb article explaining the inner workings of DCGANs and the official Github repository for Pytorch that helped me with the code implementations, especially the network architectures for both Generator and Discriminator. Hopefully, the explanations I have presented in this article help you gain even further clarity (than already present in the aforementioned blogs) regarding GANs and implement them even better for your own use-case! If this in-depth educational content is useful for you, you can subscribe to our AI research mailing list to be alerted when we release new material.
Mar-11-2021, 16:15:13 GMT
- Technology: