aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dcgan.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/dcgan.py b/dcgan.py
index bb19446..0d0ff12 100644
--- a/dcgan.py
+++ b/dcgan.py
@@ -142,7 +142,8 @@ class DCGAN():
idx = np.random.randint(0, X_train.shape[0], batch_size)
ref_imgs = X_train[idx]
mu = np.mean(ref_imgs, axis=0)
- sigma = np.var(ref_imgs, axis=0)
+ sigma = 1#np.var(ref_imgs, axis=0)
+ #need to redefine sigma because of division by zero
imgs = np.divide(np.subtract(imgs, mu), sigma)
# Sample noise and generate a batch of new images