How it works...
In step 1, we set the values of the network parameters. We set the input dimension equal to 784, which is equal to the dimension of a flattened MNIST fashion image. In step 2, we defined an input layer for the VAE and the first hidden layer with 256 neural units and the ReLU activation function. In step 3, we created two dense layers, z_mean and z_sigma. These layers have units equal to the dimensions of the latent distribution. In our example, we compressed the input space of 784 dimensions to a two-dimensional latent space. Note that these layers are individually connected to the layers defined previously. These layers represent the mean () and standard deviation () attributes of the latent representation. In step 4, w
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access