#NEWLINE# def grad( self , inp , grads ) : #NEWLINE# #INDENT# ( img , top , output , desc , alpha , beta ) = inp #NEWLINE# ( kerns , ) = grads #NEWLINE# kerns = gpu_contiguous ( kerns ) #NEWLINE# d_img = GpuDnnConvGradI ( ) ( kerns , top , gpu_alloc_empty ( * img . shape ) , desc ) #NEWLINE# d_top = GpuDnnConv ( ) ( img , kerns , gpu_alloc_empty ( * top . shape ) , desc ) #NEWLINE# d_alpha = grad_not_implemented ( self , 4 , alpha ) #NEWLINE# d_beta = grad_not_implemented ( self , 5 , beta ) #NEWLINE# return ( ( d_img * alpha ) , ( d_top * alpha ) , ( kerns * beta ) , DisconnectedType ( ) ( ) , d_alpha , d_beta )