From ee76c6060ef362d270a9c97c2bfd02788b4c0cd8 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Tue, 5 Mar 2019 14:34:39 +0000 Subject: Fix imports for dcgan --- dcgan.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dcgan.py b/dcgan.py index 8a1bc2b..21afaac 100644 --- a/dcgan.py +++ b/dcgan.py @@ -1,15 +1,16 @@ from __future__ import print_function, division import tensorflow as keras +import tensorflow as tf from tensorflow.keras.datasets import mnist from tensorflow.keras.layers import Input, Dense, Reshape, Flatten, Dropout from tensorflow.keras.layers import BatchNormalization, Activation, ZeroPadding2D -from tensorflow.keras.layers.advanced_activations import LeakyReLU -from tensorflow.keras.layers.convolutional import UpSampling2D, Conv2D +from tensorflow.keras.layers import LeakyReLU +from tensorflow.keras.layers import UpSampling2D, Conv2D from tensorflow.keras.models import Sequential, Model from tensorflow.keras.optimizers import Adam -from lib/virtual_batch import VirtualBatchNormalization +from lib.virtual_batch import VirtualBatchNormalization import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec @@ -202,6 +203,6 @@ class DCGAN(): ''' if __name__ == '__main__': - dcgan = DCGAN() + dcgan = DCGAN(virtual_batch_normalization=True) dcgan.train(epochs=4000, batch_size=32, save_interval=50) ''' -- cgit v1.2.3-54-g00ecf