#NEWLINE# def check_backward( self , x_data , W_data , b_data , y_grad ) : #NEWLINE# #INDENT# xp = cuda . get_array_module ( x_data ) #NEWLINE# if ( not self . c_contiguous ) : #NEWLINE# #INDENT# x_data = xp . asfortranarray ( x_data ) #NEWLINE# W_data = xp . asfortranarray ( W_data ) #NEWLINE# y_grad = xp . asfortranarray ( y_grad ) #NEWLINE# self . assertFalse ( x_data . flags . c_contiguous ) #NEWLINE# self . assertFalse ( W_data . flags . c_contiguous ) #NEWLINE# self . assertFalse ( y_grad . flags . c_contiguous ) #NEWLINE# if ( b_data is not None ) : #NEWLINE# #INDENT# b = xp . empty ( ( ( len ( b_data ) * 2 ) , ) , dtype = self . b . dtype ) #NEWLINE# b [ : : 2 ] = b_data #NEWLINE# b_data = b [ : : 2 ] #NEWLINE# self . assertFalse ( b_data . flags . c_contiguous ) #NEWLINE# #UNINDENT# #UNINDENT# args = ( x_data , W_data ) #NEWLINE# if ( b_data is not None ) : #NEWLINE# #INDENT# args = ( args + ( b_data , ) ) #NEWLINE# #UNINDENT# gradient_check . check_backward ( deconvolution_2d . Deconvolution2DFunction ( self . stride , self . pad , self . outsize , self . use_cudnn ) , args , y_grad , eps = 0.01 )