def test_gaussian_vis_layer_make_state():
 n = 5
 rows = None
 cols = None
 channels = None
 num_samples = 1000
 tol = 0.042
 beta = (1 / tol)
 layer = GaussianVisLayer(nvis=n, init_beta=beta)
 rng = np.random.RandomState([2012, 11, 1])
 mean = rng.uniform(1e-06, (1.0 - 1e-06), (n,))
 z = mean
 layer.set_biases(z.astype(config.floatX))
 init_state = layer.make_state(num_examples=num_samples, numpy_rng=rng)
 value = init_state.get_value()
 check_gaussian_samples(value, num_samples, n, rows, cols, channels, mean, tol)

def test_gaussian_vis_layer_make_state ( ) : n = 5 rows = None cols = None channels = None num_samples = 1000 tol = 0.042 beta = ( 1 / tol ) layer = GaussianVisLayer ( nvis = n , init_beta = beta ) rng = np . random . RandomState ( [ 2012 , 11 , 1 ] ) mean = rng . uniform ( 1e-06 , ( 1.0 - 1e-06 ) , ( n , ) ) z = mean layer . set_biases ( z . astype ( config . floatX ) ) init_state = layer . make_state ( num_examples = num_samples , numpy_rng = rng ) value = init_state . get_value ( ) check_gaussian_samples ( value , num_samples , n , rows , cols , channels , mean , tol )
verifies that gaussianvislayer .