class_docstr: Implement the grad of downsample with max on the gpu.
class_docstr_tok: ["Implement","the","grad","of","downsample","with","max","on","the","gpu","."]
code: def __init__(self, ignore_border, mode="max", ndim=2):
      self.ndim = ndim
      self.ignore_border = ignore_border
      self.mode = mode
      CGpuKernelBase.__init__(
          self,
          ["c_code/pool_grad_grad.c"],
          "APPLY_SPECIFIC(pool_grad_grad)",
      )
      assert self.mode == "max"
      assert self.ndim in [2, 3]
  
imports: from __future__ import absolute_import, print_function, division
  import theano
  from theano import Apply
  from theano.gof import ParamsType
  from theano.scalar import bool
  from theano.tensor.basic import as_tensor_variable
  from theano.tensor.signal.pool import Pool, PoolingMode_t
  from .type import gpu_context_type
  from .basic_ops import CGpuKernelBase, infer_context_name, gpuarray_helper_inc_dir, as_gpuarray_variable, gpu_contiguous
label_desc: Use image node_id 1 to create a new GpuDownsampleFactorMaxGradGrad object from inherited base classes: CGpuKernelBase with example: obj = GpuDownsampleFactorMaxGradGrad(ignore_border, mode, ndim)