#NEWLINE# def grad( self , inp , grads ) : #NEWLINE# #INDENT# '\n        .. todo::\n\n            WRITEME\n        ' #NEWLINE# ( x , top_down ) = inp #NEWLINE# ( p , h ) = self ( x , top_down ) #NEWLINE# ( gp , gh ) = grads #NEWLINE# gp_iszero = 0.0 #NEWLINE# gh_iszero = 0.0 #NEWLINE# if isinstance ( gp . type , theano . gradient . DisconnectedType ) : #NEWLINE# #INDENT# gp = tensor . zeros_like ( p ) #NEWLINE# gp_iszero = 1.0 #NEWLINE# #UNINDENT# if isinstance ( gh . type , theano . gradient . DisconnectedType ) : #NEWLINE# #INDENT# gh = tensor . zeros_like ( h ) #NEWLINE# gh_iszero = 1.0 #NEWLINE# #UNINDENT# gp = gpu_contiguous ( gp ) #NEWLINE# gh = gpu_contiguous ( gh ) #NEWLINE# gp_iszero = as_cuda_ndarray_variable ( gp_iszero ) #NEWLINE# gh_iszero = as_cuda_ndarray_variable ( gh_iszero ) #NEWLINE# return ProbMaxPoolGrad ( self . ds , self . stride , self . start ) ( p , h , gp , gh , gp_iszero , gh_iszero )