aboutsummaryrefslogtreecommitdiff
path: root/dcgan.py
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-03-04 17:00:57 +0000
committerVasil Zlatanov <v@skozl.com>2019-03-04 17:00:57 +0000
commit802f52a2410ed20cea55e8c097b3875111a80824 (patch)
tree2ffe7adee2842ff9c1ae1f2d998d054dff4c6fb3 /dcgan.py
parent06228fb5afde4180c697ce244b7465b7533d3cbc (diff)
downloade4-gan-802f52a2410ed20cea55e8c097b3875111a80824.tar.gz
e4-gan-802f52a2410ed20cea55e8c097b3875111a80824.tar.bz2
e4-gan-802f52a2410ed20cea55e8c097b3875111a80824.zip
Use tqdm in dcgan
Diffstat (limited to 'dcgan.py')
-rw-r--r--dcgan.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dcgan.py b/dcgan.py
index a0a26c9..bc7e14e 100644
--- a/dcgan.py
+++ b/dcgan.py
@@ -10,6 +10,8 @@ from keras.optimizers import Adam
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
+from tqdm import tqdm
+
import sys
import numpy as np
@@ -125,7 +127,7 @@ class DCGAN():
xaxis = np.arange(epochs)
loss = np.zeros((2,epochs))
- for epoch in range(epochs):
+ for epoch in tqdm(range(epochs)):
# ---------------------
# Train Discriminator
@@ -153,8 +155,6 @@ class DCGAN():
# Plot the progress
#print ("%d [D loss: %f, acc.: %.2f%%] [G loss: %f]" % (epoch, d_loss[0], 100*d_loss[1], g_loss))
- if epoch % 500 == 0:
- print(epoch)
loss[0][epoch] = d_loss[0]
loss[1][epoch] = g_loss
# If at save interval => save generated image samples