class_docstr: Implements the R-operator for the downsample operation.
class_docstr_tok: ["Implements","the","R-operator","for","the","downsample","operation","."]
code: def make_node(self, inp, eval_point, ws, stride=None, pad=None):
      ctx_name = infer_context_name(inp)
      nd = self.ndim
      inp = as_gpuarray_variable(inp, ctx_name)
      assert inp.ndim == nd + 2
      eval_point = as_gpuarray_variable(eval_point, ctx_name)
      assert eval_point.ndim == nd + 2
  
      if stride is None:
          stride = ws
      if pad is None:
          pad = (0,) * nd
      elif isinstance(pad, (tuple, list)):
          if max(pad) != 0 and not self.ignore_border:
              raise ValueError(
                  "Padding works only with ignore_border=True"
              )
          if isinstance(ws, (tuple, list)):
              if any(pad[i] >= ws[i] for i in range(nd)):
                  raise ValueError(
                      "Padding must be smaller than strides"
                  )
  
      ws = as_tensor_variable(ws)
      stride = as_tensor_variable(stride)
      pad = as_tensor_variable(pad)
      assert ws.ndim == stride.ndim and ws.ndim == pad.ndim
      assert ws.ndim == 1
      if ws.dtype not in theano.tensor.int_dtypes:
          raise TypeError("Window shape parameters must be ints.")
      if stride.dtype not in theano.tensor.int_dtypes:
          raise TypeError("Stride parameters must be ints.")
      if pad.dtype not in theano.tensor.int_dtypes:
          raise TypeError("Padding parameters must be ints.")
  
      ws = theano.tensor.cast(ws, "int64")
      stride = theano.tensor.cast(stride, "int64")
      pad = theano.tensor.cast(pad, "int64")
  
      return Apply(
          self, [inp, eval_point, ws, stride, pad], [eval_point.type()]
      )
  
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 5 for calling the GpuMaxPoolRop obj's underlying member method code with example usage: obj.make_node(inp, eval_point, ws, stride, pad) and returns: Apply