aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornunzip <np.scarh@gmail.com>2019-02-27 23:10:04 +0000
committernunzip <np.scarh@gmail.com>2019-02-27 23:10:04 +0000
commit723ac9bb7094b482a2efc6bc97139409d2bde9c4 (patch)
tree925e642e00affa87163a79ece23c1cbcddf6c111
parent6cf023576314b4aa39a8d5d5dc60e656958dde6d (diff)
downloade4-gan-723ac9bb7094b482a2efc6bc97139409d2bde9c4.tar.gz
e4-gan-723ac9bb7094b482a2efc6bc97139409d2bde9c4.tar.bz2
e4-gan-723ac9bb7094b482a2efc6bc97139409d2bde9c4.zip
Save images for all classes instead of zero only
-rw-r--r--cgan.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cgan.py b/cgan.py
index 3b3d0b7..716e5ae 100644
--- a/cgan.py
+++ b/cgan.py
@@ -175,9 +175,11 @@ class CGAN():
r, c = 2, 5
noise = np.random.normal(0, 1, (r * c, 100))
sampled_labels = np.arange(0, 10).reshape(-1, 1)
- dummy_labels = np.zeros(32).reshape(-1, 1)
+
+ #using dummy_labels would just print zeros to help identify image quality
+ #dummy_labels = np.zeros(32).reshape(-1, 1)
- gen_imgs = self.generator.predict([noise, dummy_labels])
+ gen_imgs = self.generator.predict([noise, sampled_labels])
# Rescale images 0 - 1
gen_imgs = 0.5 * gen_imgs + 0.5