Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. def gen_noise(batch_size, noise_shape):
  2. ''' Generates a numpy vector sampled from normal distribution of shape (batch_size,noise_shape)
  3. Input:
  4. batch_size : size of batch
  5. noise_shape: shape of noise vector, normally kept as 100
  6. Output:a numpy vector sampled from normal distribution of shape (batch_size,noise_shape)
  7. '''
  8. return np.random.normal(0, 1, size=(batch_size,)+noise_shape)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement