From 2a720c237259baa2d968286244f9e43794c7e4d9 Mon Sep 17 00:00:00 2001 From: nunzip Date: Tue, 5 Mar 2019 01:01:58 +0000 Subject: remove sigma in virtual batch norm --- dcgan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dcgan.py') 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 -- cgit v1.2.3-54-g00ecf