January 2019
Intermediate to advanced
316 pages
8h 16m
English
As we have discussed, cGANs don't learn reverse mappings from images to latent vectors. Instead, the encoder learns this reverse mapping and is capable of generating latent vectors that we can use to generate face images at a target age. Let's train the encoder network.
We have already defined the hyperparameters required for the training. Perform the following steps to train the encoder network:
# Build Encoderencoder = build_encoder()encoder.compile(loss=euclidean_distance_loss, optimizer='adam')
We haven't defined euclidean_distance_loss. Let's define it and add this before we build the encoder network: ...
Read now
Unlock full access