def test_min_zero():
 mlp = MLP(input_space=VectorSpace(1), layers=[Maxout(layer_name='test_layer', num_units=1, num_pieces=2, irange=0.05, min_zero=True)])
 X = T.matrix()
 output = mlp.fprop(X)
 f = function([X], output, mode='DEBUG_MODE')
 f(np.zeros((1, 1)).astype(X.dtype))

def test_min_zero ( ) : mlp = MLP ( input_space = VectorSpace ( 1 ) , layers = [ Maxout ( layer_name = 'test_layer' , num_units = 1 , num_pieces = 2 , irange = 0.05 , min_zero = True ) ] ) X = T . matrix ( ) output = mlp . fprop ( X ) f = function ( [ X ] , output , mode = 'DEBUG_MODE' ) f ( np . zeros ( ( 1 , 1 ) ) . astype ( X . dtype ) )
this test guards against a bug where the size of the zero buffer used with the min_zero flag was specified to have the wrong size .