Model definition and training phase

Defining the Generator and the Discriminator as neural networks allows us to tackle the problem using all the neural network architectures that have been developed over the years, with each one specialized to work with a certain data type.

There are no constraints in the model's definition; in fact, it is possible to define their architecture in a completely arbitrary manner. The only constraints are given by the structure of the data we are working on; the architectures depend on the data type, all of which are as follows:

  • Images: Convolutional neural networks
  • Sequences, Text: Recurrent neural networks
  • Numerical, Categorical values: Fully connected networks

Once we've defined the model's architecture ...

Get Hands-On Neural Networks with TensorFlow 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.