class_docstr: Feature Relay Head used in `SCNet <https://arxiv.org/abs/2012.10150>`_.
  
  Args:
      in_channels (int): number of input channels. Defaults to 256.
      conv_out_channels (int): number of output channels before
          classification layer. Defaults to 256.
      roi_feat_size (int): roi feat size at box head. Default: 7.
      scale_factor (int): scale factor to match roi feat size
          at mask head. Defaults to 2.
      init_cfg (:obj:`ConfigDict` or dict or list[dict] or
          list[:obj:`ConfigDict`]): Initialization config dict. Defaults to
          dict(type='Kaiming', layer='Linear').
docstr: Forward function.
  
  Args:
      x (Tensor): Input feature.
  
  Returns:
      Optional[Tensor]: Output feature. When the first dim of input is
      0, None is returned.
docstr_tok: ["Forward","function",".","Args",":","x","(","Tensor",")",":","Input","feature",".","Returns",":","Optional","[","Tensor","]",":","Output","feature",".","When","the","first","dim","of","input","is","0",",","None","is","returned","."]
code: def forward(self, x: Tensor) -> Optional[Tensor]:
      """Forward function.
  
      Args:
          x (Tensor): Input feature.
  
      Returns:
          Optional[Tensor]: Output feature. When the first dim of input is
          0, None is returned.
      """
      N, _ = x.shape
      if N > 0:
          out_C = self.out_conv_channels
          out_HW = self.roi_feat_size
          x = self.fc(x)
          x = x.reshape(N, out_C, out_HW, out_HW)
          x = self.upsample(x)
          return x
      return None
  
file_path: mmdetection/mmdet/models/roi_heads/mask_heads/feature_relay_head.py
imports: from typing import Optional
  import torch.nn
  from mmengine.model import BaseModule
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import MultiConfig
label_desc: Use image node_id 2 for calling the FeatureRelayHead obj's underlying member method code with example usage: obj.forward(x) and returns: None, x