lamiastella icon

sample_z for DCGAN

lamiastella | PRO | 11/18/18 08:50:28 PM UTC | 0 ⭐ | 592 👁️ | Never ⏰ | []
Python |

300 B

|

None

|

0 👍

/

0 👎

#should be normal distribution
def sample_z(dim_z, num_batch):
    mu = 0
    sigma = 1
#    s = np.random.normal(mu, sigma, num_batch*dim_z)
    s = np.random.normal(loc=0.0, scale=1.0, size=(num_batch, dim_z)).astype(np.float32)
    samples = s.reshape(num_batch, 1, 1, dim_z) 
 
    return samples

Comments