def test_gaussian_vis_layer_make_state_conv():
 n = None
 rows = 3
 cols = 3
 channels = 3
 num_samples = 1000
 tol = 0.042
 beta = (1 / tol)
 axes = ['b', 0, 1, 'c']
 random.shuffle(axes)
 axes = tuple(axes)
 print('axes:', axes)
 layer = GaussianVisLayer(rows=rows, cols=cols, channels=channels, init_beta=beta, axes=axes)
 rng = np.random.RandomState()
 mean = rng.uniform(1e-06, (1.0 - 1e-06), (rows, cols, channels))
 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_conv ( ) : n = None rows = 3 cols = 3 channels = 3 num_samples = 1000 tol = 0.042 beta = ( 1 / tol ) axes = [ 'b' , 0 , 1 , 'c' ] random . shuffle ( axes ) axes = tuple ( axes ) print ( 'axes:' , axes ) layer = GaussianVisLayer ( rows = rows , cols = cols , channels = channels , init_beta = beta , axes = axes ) rng = np . random . RandomState ( ) mean = rng . uniform ( 1e-06 , ( 1.0 - 1e-06 ) , ( rows , cols , channels ) ) 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 .