Advertisement
lamiastella

sample_z for DCGAN

Nov 18th, 2018
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #should be normal distribution
  2. def sample_z(dim_z, num_batch):
  3.     mu = 0
  4.     sigma = 1
  5. #    s = np.random.normal(mu, sigma, num_batch*dim_z)
  6.     s = np.random.normal(loc=0.0, scale=1.0, size=(num_batch, dim_z)).astype(np.float32)
  7.     samples = s.reshape(num_batch, 1, 1, dim_z)
  8.  
  9.     return samples
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement