#NEWLINE# def test_average_pooling_inc_padding( ) : #NEWLINE# #INDENT# x = tensor . tensor4 ( 'x' ) #NEWLINE# brick = AveragePooling ( ( 2 , 2 ) , ignore_border = True , padding = ( 1 , 1 ) , include_padding = True ) #NEWLINE# y = brick . apply ( x ) #NEWLINE# output = y . eval ( { #NEWLINE# #INDENT# x : ( 3 * numpy . ones ( ( 1 , 1 , 2 , 2 ) , dtype = theano . config . floatX ) ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# expected_out = numpy . array ( [ 0.75 , 0.75 , 0.75 , 0.75 ] ) . reshape ( 1 , 1 , 2 , 2 ) #NEWLINE# assert_allclose ( expected_out , output )