aboutsummaryrefslogtreecommitdiff
path: root/dcgan.py
diff options
context:
space:
mode:
Diffstat (limited to 'dcgan.py')
-rw-r--r--dcgan.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dcgan.py b/dcgan.py
index eca1852..8a1bc2b 100644
--- a/dcgan.py
+++ b/dcgan.py
@@ -124,7 +124,7 @@ class DCGAN():
return Model(img, validity)
- def train(self, epochs, batch_size=128, save_interval=50):
+ def train(self, epochs, batch_size=128, save_interval=50, VBN=False):
# Load the dataset
(X_train, _), (_, _) = mnist.load_data()
@@ -139,6 +139,7 @@ class DCGAN():
xaxis = np.arange(epochs)
loss = np.zeros((2,epochs))
+
for epoch in tqdm(range(epochs)):
# ---------------------
@@ -150,7 +151,6 @@ class DCGAN():
imgs = X_train[idx]
tf.keras.backend.get_session().run(tf.global_variables_initializer())
-
# Sample noise and generate a batch of new images
noise = np.random.normal(0, 1, (batch_size, self.latent_dim))
gen_imgs = self.generator.predict(noise)