Training: Image Synthesis and Manipulation

Get familiar with the training setup, loop, and supporting functions in pix2pixHD.

The training loop for pix2pixHD is certainly more complex than pix2pix, given the feature matching loss, the number of inputs, and many other things. Let’s start with the helper functions.

Helper functions

In pix2pixHD, we use the intermediate outputs of the discriminator to compute the feature matching loss. The implementation is straightforward: we first collect the intermediate layer outputs from the discriminator on real and fake samples, and then we compute the mean absolute distance between these intermediate outputs.

Get hands-on with 1200+ tech skills courses.