class_docstr: cuDNN pooling implementation
class_docstr_tok: ["cuDNN","pooling","implementation"]
code: def forward(self, x):
      func = self.func
      ksize = func.ksize
      stride = func.stride
      pad = func.pad
      cover_all = func.cover_all
      pool_mode = func.get_cudnn_pool_mode()
  
      x = x[0]
      n, c = x.shape[:2]
      dims = x.shape[2:]
      ys = tuple(
          conv.get_conv_outsize(d, k, s, p, cover_all)
          for d, k, s, p in six.moves.zip(dims, ksize, stride, pad)
      )
      y_shape = (n, c) + ys
      y = cuda.cupy.empty(y_shape, dtype=x.dtype)
  
      cudnn.pooling_forward(x, y, ksize, stride, pad, pool_mode)
      func.retain_inputs((0,))
      func.retain_outputs((0,))
      return (y,)
  
file_path: chainer/chainer/functions/pooling/pooling_nd.py
imports: import six
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import conv
  from chainer.utils import conv_nd
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the _CudnnPoolingNDImpl obj's underlying member method code with example usage: obj.forward(x) and returns: y