January 2019
Intermediate to advanced
316 pages
8h 16m
English
Like vanilla GANs, the implementation of cGANs is straightforward. Keras provides enough flexibility to code complex generative adversarial networks. In this section, we will implement the generator network, the discriminator network, and the encoder network used in cGANs. Let's start by implementing the encoder network.
Before starting to write the implementations, create a Python file called main.py and import the essential modules, as follows:
import mathimport osimport timefrom datetime import datetimeimport matplotlib.pyplot as pltimport numpy as npimport tensorflow as tffrom keras import Input, Modelfrom keras.applications import InceptionResNetV2from keras.callbacks import TensorBoardfrom keras.layers ...
Read now
Unlock full access