December 2018
Intermediate to advanced
268 pages
8h 23m
English
The code is quite simple but the power of Keras really shines here—we are able to place six separate models into adversarial training in under 50 lines of code.
These are the steps for this:
#!/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_model
class GAN(object): def __init__(self, model_inputs=[],model_outputs= [],lambda_cycle=10.0,lambda_id=1.0): self.OPTIMIZER = SGD(lr=2e-4,nesterov=True) self.inputs = model_inputs self.outputs = model_outputs ...
Read now
Unlock full access