Created
June 15, 2019 04:06
-
-
Save MLWhiz/c59137f4a9836a71a38b50bda604bdd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gen_noise(batch_size, noise_shape): | |
''' Generates a numpy vector sampled from normal distribution of shape (batch_size,noise_shape) | |
Input: | |
batch_size : size of batch | |
noise_shape: shape of noise vector, normally kept as 100 | |
Output:a numpy vector sampled from normal distribution of shape (batch_size,noise_shape) | |
''' | |
return np.random.normal(0, 1, size=(batch_size,)+noise_shape) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment