#NEWLINE# def test_logical_shapes( self ) : #NEWLINE# #INDENT# for stride in range ( 1 , 4 ) : #NEWLINE# #INDENT# kshp = ( 10 , 2 , 10 , 10 ) #NEWLINE# featshp = ( 3 , 10 , 11 , 11 ) #NEWLINE# a = tensor . ftensor4 ( ) #NEWLINE# A = tensor . ftensor4 ( ) #NEWLINE# kernel_rotated = tensor . transpose ( A , axes = [ 1 , 0 , 2 , 3 ] ) #NEWLINE# featshp_logical = ( featshp [ 0 ] , featshp [ 1 ] , ( featshp [ 2 ] * stride ) , ( featshp [ 3 ] * stride ) ) #NEWLINE# kshp_rotated = ( kshp [ 1 ] , kshp [ 0 ] , kshp [ 2 ] , kshp [ 3 ] ) #NEWLINE# self . assertRaises ( ValueError , tensor . nnet . conv2d , a , kernel_rotated , border_mode = 'full' , image_shape = featshp , filter_shape = kshp_rotated , imshp_logical = featshp_logical [ 1 : ] , kshp_logical = kshp [ 2 : ] )