aboutsummaryrefslogtreecommitdiff
path: root/cgan.py
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-03-04 16:59:31 +0000
committerVasil Zlatanov <v@skozl.com>2019-03-04 16:59:31 +0000
commit06228fb5afde4180c697ce244b7465b7533d3cbc (patch)
tree46c3b2834c5fc6e08d3d9c51389fe3d2bb535cbb /cgan.py
parent5ffa17b2381aa1f298f9d9457bda09a2d9907a9b (diff)
downloade4-gan-06228fb5afde4180c697ce244b7465b7533d3cbc.tar.gz
e4-gan-06228fb5afde4180c697ce244b7465b7533d3cbc.tar.bz2
e4-gan-06228fb5afde4180c697ce244b7465b7533d3cbc.zip
Use tqdm in cgan
Diffstat (limited to 'cgan.py')
-rwxr-xr-xcgan.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/cgan.py b/cgan.py
index 68256f3..5ab0c10 100755
--- a/cgan.py
+++ b/cgan.py
@@ -10,6 +10,7 @@ from keras.models import Sequential, Model
from keras.optimizers import Adam
import matplotlib.pyplot as plt
from IPython.display import clear_output
+from tqdm import tqdm
import numpy as np
@@ -122,7 +123,7 @@ class CGAN():
xaxis = np.arange(epochs)
loss = np.zeros((2,epochs))
- for epoch in range(epochs):
+ for epoch in tqdm(range(epochs)):
# ---------------------
# Train Discriminator
@@ -154,9 +155,6 @@ class CGAN():
# 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:
- clear_output()
- print(epoch)
loss[0][epoch] = d_loss[0]
loss[1][epoch] = g_loss