aboutsummaryrefslogtreecommitdiff
path: root/dcgan.py
diff options
context:
space:
mode:
Diffstat (limited to 'dcgan.py')
-rw-r--r--dcgan.py9
1 files 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)
'''