concept NFs in category Keras

This is an excerpt from Manning's book Probabilistic Deep Learning: With Python, Keras and TensorFlow Probability.
But how to set up and fit a flexible high dimensional distribution? Think, for example, of color images with 256 x 256 x 3 = 195,840 pixels defining a 195,840 dimensional space, where each image can be represented by one point. If you pick a random point in this space, then you’d most probably get an image that looks like noise. This means the distribution of realistic images like facial images only covers a subregion, which might not be easy to define. How can you learn the 195,840 dimensional distribution from which facial images can be drawn? Use normalizing flows! In a nutshell, an NF learns a transformation (flow) from a simple high dimensional distribution to a complex one. In a valid distribution, probabilities need to sum up to 1 in the discrete case, or the integral needs to be 1 in the continuous case, and these need to be normalized. The flows in NFs keep this normalizing property intact. Hence, the name normalizing flow or NF for short.
In this section we explain how NFs work. You’ll see that NFs are probabilistic models that you can fit with the same maximum likelihood approach that you’ve used throughout the last couple of chapters. You’ll also be able to use a fitted distribution to generate realistic looking faces of people who don’t even exist or to morph an image of your face with the image of Brad Pitt, for example.
NFs are especially useful in high dimensional spaces. But it’s hard to imagine a space with more than three dimensions. Therefore, we explain NFs in low dimensions. But don’t worry, we get to the high dimensional distribution of facial images at the end of this section.
What are NFs and what are they good for? The basic idea is that an NF can fit a complex distribution (like the one in figure 6.6) without picking in advance an appropriate distribution family or setting up a mixture of several distributions.