aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-03-05 14:34:39 +0000
committerVasil Zlatanov <v@skozl.com>2019-03-05 14:34:39 +0000
commitee76c6060ef362d270a9c97c2bfd02788b4c0cd8 (patch)
tree6ca3780a0de40015255753fef1836c50b4c0c47a
parent6b573a30a3021d259400af9751645eb1a5b4705b (diff)
downloade4-gan-ee76c6060ef362d270a9c97c2bfd02788b4c0cd8.tar.gz
e4-gan-ee76c6060ef362d270a9c97c2bfd02788b4c0cd8.tar.bz2
e4-gan-ee76c6060ef362d270a9c97c2bfd02788b4c0cd8.zip
Fix imports for dcgan
-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)
'''