Auxiliary Functions

Understand how auxiliary functions are implemented for tasks like data preparation, result visualization, and loss plotting.

We are going to use three auxiliary functions to get the data, plot the images, and plot the losses.

The get_data() function

The function to get the data uses the Keras cifar10 class, converts it to FP32—32-bit floating point—and scales it to [1,1][-1, 1]. Scaling images to [1,1][-1, 1] is a common practice when training GANs on image data that bounds the range of the output, possibly avoiding explosions:

Get hands-on with 1400+ tech skills courses.