We’re finally ready to train the Human Faces GAN.

The training loop

The training loop code has the same structure as before, with minor changes to move the discriminator and generator to the GPU and also ensure the target values are of type torch.cuda.FloatTensor.

Get hands-on with 1200+ tech skills courses.