December 2018
Intermediate to advanced
268 pages
8h 23m
English
The GAN model is vastly simplified in comparison to the building of the generator and discriminator. Essentially, this class will put the generator and discriminator into adversarial training along with the custom loss functions.
Take the following steps:
#!/usr/bin/env python3import sysimport numpy as npfrom keras.models import Sequential, Modelfrom keras.layers import Inputfrom keras.optimizers import Adam, SGDfrom keras.utils import plot_modelfrom loss import Loss
class GAN(object): def __init__(self, model_inputs=[],model_outputs=[], name='gan'):
Read now
Unlock full access