With this in mind, the approach I will take is to show you how to train your own generative models on your own data, rather than relying on pre-trained off-the-shelf models. While there are now many impressive open source generative models that can be downloaded and run in a few lines of code, the aim of this book is to dig deeper into their architecture and design from first principles, so that you gain a complete understanding of how they work and can code up examples of each technique from scratch using Python and Keras.
In summary, this book can be thought of as a map of the current generative AI landscape that covers both theory and practical applications, including full working examples of key models from the literature. We will walk through the code for each step by step, with clear signposts that show how the code implements the theory underpinning each technique. This book can be read cover to cover or used as a reference book that you can dip into. Above all, I hope you find it a useful and enjoyable read!
Prerequisites
This book assumes that you have experience coding in Python. If you are not familiar with Python, the best place to start is through LearnPython.org. There are many free resources online that will allow you to develop enough Python knowledge to work with the examples in this book.
Also, since some of the models are described using mathematical notation, it will be useful to have a solid understanding of linear algebra (for example, matrix multiplication) and general probability theory. A useful resource is Deisenroth et al.’s book Mathematics for Machine Learning (Cambridge University Press), which is freely available.
The book assumes no prior knowledge of generative modeling (we will examine the key concepts in Chapter 1) or TensorFlow and Keras (these libraries will be introduced in Chapter 2).