diff options
-rw-r--r-- | dcgan.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |