#NEWLINE# def test_channels( self ) : #NEWLINE# #INDENT# '\n        Go from 2 to 3 channels and see whether the shape is correct.\n        ' #NEWLINE# input_space = Conv2DSpace ( ( 3 , 3 ) , num_channels = 3 ) #NEWLINE# filters_values = np . ones ( ( 2 , 3 , 2 , 2 ) , dtype = theano . config . floatX ) #NEWLINE# filters = sharedX ( filters_values ) #NEWLINE# image = np . random . rand ( 1 , 3 , 3 , 3 ) . astype ( theano . config . floatX ) #NEWLINE# cudnn2d = Cudnn2D ( filters , 1 , input_space ) #NEWLINE# f = theano . function ( [ self . image_tensor ] , cudnn2d . lmul ( self . image_tensor ) ) #NEWLINE# assert ( f ( image ) . shape == ( 1 , 2 , 2 , 2 ) )