class_docstr: Base class of pooling function over a set of 2d planes.
class_docstr_tok: ["Base","class","of","pooling","function","over","a","set","of","2d","planes","."]
code: def forward_gpu(self, x):
      self.retain_inputs((0,))
      self._used_cudnn = True
  
      # Implementation using cudnn
      x = x[0]
      n, c, h, w = x.shape
      y_h = conv.get_conv_outsize(
          h, self.kh, self.sy, self.ph, self.cover_all
      )
      assert y_h > 0, "Height in the output should be positive."
      y_w = conv.get_conv_outsize(
          w, self.kw, self.sx, self.pw, self.cover_all
      )
      assert y_w > 0, "Width in the output should be positive."
      y = cuda.cupy.empty((n, c, y_h, y_w), dtype=x.dtype)
  
      cudnn.pooling_forward(
          x,
          y,
          (self.kh, self.kw),
          (self.sy, self.sx),
          (self.ph, self.pw),
          self._get_pool_mode(),
      )
      self.retain_outputs((0,))
      return (y,)
  
file_path: chainer/chainer/functions/pooling/pooling_2d.py
imports: from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import collections_abc
  from chainer.utils import conv
  from chainer.utils import type_check
label_desc: Use image node_id 3 for calling the Pooling2D obj's underlying member method code with example usage: obj.forward_gpu(x) and returns: y