From 0522b299f1e3771eb4529dbd61bf069338b27318 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Wed, 13 Mar 2019 20:11:48 +0000 Subject: Fix cdcgan --- cdcgan.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cdcgan.py b/cdcgan.py index f2122b8..effc89b 100755 --- a/cdcgan.py +++ b/cdcgan.py @@ -75,9 +75,12 @@ class CDCGAN(): model.add(Activation("relu")) model.add(Conv2DTranspose(64, kernel_size=3, padding="same")) + model.add(BatchNormalization()) + model.add(Activation("relu")) + + model.add(Conv2DTranspose(1, kernel_size=3, padding="same")) model.add(Activation("tanh")) - #model.summary() noise = Input(shape=(self.latent_dim,)) label = Input(shape=(1,), dtype='int32') @@ -85,6 +88,8 @@ class CDCGAN(): model_input = multiply([noise, label_embedding]) img = model(model_input) + #model.summary() + return Model([noise, label], img) def build_discriminator(self): -- cgit v1.2.3-54-g00ecf