#NEWLINE# def grad( self , inp , grads ) : #NEWLINE# #INDENT# ( kerns , top , output , desc , alpha , beta ) = inp #NEWLINE# ( img , ) = grads #NEWLINE# img = gpu_contiguous ( img ) #NEWLINE# d_kerns = GpuDnnConvGradW ( ) ( img , top , gpu_alloc_empty ( * kerns . 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_kerns * alpha ) , ( d_top * alpha ) , ( img * beta ) , DisconnectedType ( ) ( ) , d_alpha , d_beta )