aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornunzip <np.scarh@gmail.com>2019-03-05 01:01:58 +0000
committernunzip <np.scarh@gmail.com>2019-03-05 01:01:58 +0000
commit2a720c237259baa2d968286244f9e43794c7e4d9 (patch)
treefa63f8e9c4b7e23c2ff70e099cddc237fe2978ef
parent2bb025014db2c8d968298125d251cbc4ca5949d1 (diff)
downloade4-gan-2a720c237259baa2d968286244f9e43794c7e4d9.tar.gz
e4-gan-2a720c237259baa2d968286244f9e43794c7e4d9.tar.bz2
e4-gan-2a720c237259baa2d968286244f9e43794c7e4d9.zip
remove sigma in virtual batch norm
-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