The training model for handwritten digits is based on the repo https://github.com/jeffxtang/generative-adversarial-networks, which is a fork of https://github.com/jonbruner/generative-adversarial-networks, with added script that shows generated digits and saves the TensorFlow trained model with an input placeholder, so our iOS and Android apps can use the model. You should check out the blog https://www.oreilly.com/learning/generative-adversarial-networks-for-beginners for the original repo, if you need a basic understanding of the GAN model with code before moving on.
Before we look into the core code snippet that defines the generator and discriminator networks and does the GAN training, ...