class_docstr: RoI max pooling over a set of 2d planes.
class_docstr_tok: ["RoI","max","pooling","over","a","set","of","2d","planes","."]
code: def backward_cpu(self, inputs, gy):
      bottom_rois, bottom_roi_indices = inputs[1:]
      channels, height, width = self._bottom_data_shape[1:]
      bottom_diff = numpy.zeros(
          self._bottom_data_shape, bottom_rois.dtype
      )
  
      pooled_height = self.outh
      pooled_width = self.outw
      top_diff = gy[0]
  
      for i in six.moves.range(top_diff.size):
          pw = i % pooled_width
          ph = int(i / pooled_width) % pooled_height
          c = int(i / pooled_width / pooled_height) % channels
          n = int(i / pooled_width / pooled_height / channels)
  
          roi_batch_ind = int(bottom_roi_indices[n])
  
          max_idx = self.argmax_data[n, c, ph, pw]
          h = int(max_idx / width)
          w = max_idx % width
          if max_idx != -1:
              bottom_diff[roi_batch_ind, c, h, w] += top_diff[
                  n, c, ph, pw
              ]
      return bottom_diff, None, None
  
file_path: chainer/chainer/functions/pooling/roi_max_pooling_2d.py
imports: import numbers
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import function
  from chainer import utils
  from chainer.utils import type_check
  from chainer.functions.pooling.roi_pooling_2d import _roi_pooling_slice
label_desc: Use image node_id 5 for calling the ROIMaxPooling2D obj's underlying member method code with example usage: obj.backward_cpu(inputs, gy) and returns: bottom_diff,  None,  None