#NEWLINE# def test_make_random_conv2D( self ) : #NEWLINE# #INDENT# '\n        Test a random convolution.\n\n        Create a random convolution and check whether the shape, axes and\n        input space are all what we expect.\n        ' #NEWLINE# output_space = Conv2DSpace ( ( 2 , 2 ) , 1 ) #NEWLINE# cudnn2d = make_random_conv2D ( 1 , self . input_space , output_space , ( 2 , 2 ) , 1 ) #NEWLINE# f = theano . function ( [ self . image_tensor ] , cudnn2d . lmul ( self . image_tensor ) ) #NEWLINE# assert ( f ( f . image ) . shape == ( 1 , 2 , 2 , 1 ) ) #NEWLINE# assert ( cudnn2d . _input_space == self . input_space ) #NEWLINE# assert ( cudnn2d . _output_axes == output_space . axes )