class_docstr: Mask Head network of Mask R-CNN.
  
  Args:
      n_class (int): The number of classes including background.
      scales (tuple of floats): The scales of feature maps.
class_docstr_tok: ["Mask","Head","network","of","Mask","R-CNN",".","Args",":","n_class","(","int",")",":","The","number","of","classes","including","background",".","scales","(","tuple","of","floats",")",":","The","scales","of","feature","maps","."]
code: def forward(self, hs, rois, roi_indices):
      pooled_hs = []
      for l, h in enumerate(hs):
          if len(rois[l]) == 0:
              continue
  
          pooled_hs.append(
              F.roi_average_align_2d(
                  h,
                  rois[l],
                  roi_indices[l],
                  self._roi_size,
                  self._scales[l],
                  self._roi_sample_ratio,
              )
          )
  
      if len(pooled_hs) == 0:
          out_size = self.segm_size
          segs = chainer.Variable(
              self.xp.empty(
                  (0, self._n_class, out_size, out_size),
                  dtype=np.float32,
              )
          )
          return segs
  
      h = F.concat(pooled_hs, axis=0)
      h = self.conv1(h)
      h = self.conv2(h)
      h = self.conv3(h)
      h = self.conv4(h)
      h = F.relu(self.conv5(h))
      return self.seg(h)
  
file_path: chainercv/chainercv/links/model/fpn/mask_head.py
imports: from __future__ import division
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainer.initializers import HeNormal
  import chainer.links
  from chainercv.links import Conv2DActiv
  from chainercv.utils.bbox.bbox_iou import bbox_iou
  from chainercv.links.model.fpn.mask_utils import mask_to_segm
  from chainercv.links.model.fpn.mask_utils import segm_to_mask
label_desc: Use image node_id 2 for calling the MaskHead obj's underlying member method code with example usage: obj.forward(hs, rois, roi_indices) and returns: self, segs