diff options
author | Vasil Zlatanov <v@skozl.com> | 2019-03-05 14:34:39 +0000 |
---|---|---|
committer | Vasil Zlatanov <v@skozl.com> | 2019-03-05 14:34:39 +0000 |
commit | ee76c6060ef362d270a9c97c2bfd02788b4c0cd8 (patch) | |
tree | 6ca3780a0de40015255753fef1836c50b4c0c47a /dcgan.py | |
parent | 6b573a30a3021d259400af9751645eb1a5b4705b (diff) | |
download | e4-gan-ee76c6060ef362d270a9c97c2bfd02788b4c0cd8.tar.gz e4-gan-ee76c6060ef362d270a9c97c2bfd02788b4c0cd8.tar.bz2 e4-gan-ee76c6060ef362d270a9c97c2bfd02788b4c0cd8.zip |
Fix imports for dcgan
Diffstat (limited to 'dcgan.py')
-rw-r--r-- | dcgan.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) ''' |