Defining Activation Functions and The Loss Function

Understand the concepts of activation functions and loss function and practice generating samples using a basic GAN.

We will be only using NumPy to calculate and train our GAN model (and optionally using Matplotlib to visualize the signals). All of the following code can be placed in a simple .py file (such as simple_gan.py). Let’s look at the code step by step:

  1. Import the numpy library:

Get hands-on with 1400+ tech skills courses.