class_docstr: Coarse mask head used in PointRend.
  
  Compared with standard ``FCNMaskHead``, ``CoarseMaskHead`` will downsample
  the input feature map instead of upsample it.
  
  Args:
      num_convs (int): Number of conv layers in the head. Defaults to 0.
      num_fcs (int): Number of fc layers in the head. Defaults to 2.
      fc_out_channels (int): Number of output channels of fc layer.
          Defaults to 1024.
      downsample_factor (int): The factor that feature map is downsampled by.
          Defaults to 2.
      init_cfg (dict or list[dict], optional): Initialization config dict.
docstr: Forward features from the upstream network.
  
  Args:
      x (Tensor): Extract mask RoI features.
  
  Returns:
      Tensor: Predicted foreground masks.
docstr_tok: ["Forward","features","from","the","upstream","network",".","Args",":","x","(","Tensor",")",":","Extract","mask","RoI","features",".","Returns",":","Tensor",":","Predicted","foreground","masks","."]
code: def forward(self, x: Tensor) -> Tensor:
      """Forward features from the upstream network.
  
      Args:
          x (Tensor): Extract mask RoI features.
  
      Returns:
          Tensor: Predicted foreground masks.
      """
      for conv in self.convs:
          x = conv(x)
  
      if self.downsample_conv is not None:
          x = self.downsample_conv(x)
  
      x = x.flatten(1)
      for fc in self.fcs:
          x = self.relu(fc(x))
      mask_preds = self.fc_logits(x).view(
          x.size(0), self.num_classes, *self.output_size
      )
      return mask_preds
  
file_path: mmdetection/mmdet/models/roi_heads/mask_heads/coarse_mask_head.py
imports: from mmcv.cnn import ConvModule, Linear
  from mmengine.model import ModuleList
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import MultiConfig
  from .fcn_mask_head import FCNMaskHead
label_desc: Use image node_id 3 for calling the CoarseMaskHead obj's underlying member method code with example usage: obj.forward(x) and returns: mask_preds