def check_gaussian(rng, mean, std, shape): weights = IsotropicGaussian(std, mean).generate(rng, shape) assert weights.shape == shape assert weights.dtype == theano.config.floatX assert_allclose(weights.mean(), mean, atol=1e-2) assert_allclose(weights.std(), std, atol=1e-2)