class_docstr: Base module of Semantic Head.
  
  Args:
      num_classes (int): the number of classes.
      seg_rescale_factor (float): the rescale factor for ``gt_sem_seg``,
          which equals to ``1 / output_strides``. The output_strides is
          for ``seg_preds``. Defaults to  1 / 4.
      init_cfg (Optional[Union[:obj:`ConfigDict`, dict]]): the initialization
          config.
      loss_seg (Union[:obj:`ConfigDict`, dict]): the loss of the semantic
          head.
docstr: Args:
      x (Union[Tensor, Tuple[Tensor]]): Feature maps.
      batch_data_samples (list[:obj:`DetDataSample`]): The batch
          data samples. It usually includes information such
          as `gt_instance` or `gt_panoptic_seg` or `gt_sem_seg`.
  
  Args:
      x (Tensor): Feature maps.
  
  Returns:
      Dict[str, Tensor]: The loss of semantic head.
docstr_tok: ["Args",":","x","(","Union","[","Tensor",",","Tuple","[","Tensor","]","]",")",":","Feature","maps",".","batch_data_samples","(","list","[",":","obj",":","`","DetDataSample","`","]",")",":","The","batch","data","samples",".","It","usually","includes","information","such","as","`","gt_instance","`","or","`","gt_panoptic_seg","`","or","`","gt_sem_seg","`",".","Args",":","x","(","Tensor",")",":","Feature","maps",".","Returns",":","Dict","[","str",",","Tensor","]",":","The","loss","of","semantic","head","."]
code: def loss(
      self,
      x: Union[Tensor, Tuple[Tensor]],
      batch_data_samples: SampleList,
  ) -> Dict[str, Tensor]:
      """
      Args:
          x (Union[Tensor, Tuple[Tensor]]): Feature maps.
          batch_data_samples (list[:obj:`DetDataSample`]): The batch
              data samples. It usually includes information such
              as `gt_instance` or `gt_panoptic_seg` or `gt_sem_seg`.
  
      Args:
          x (Tensor): Feature maps.
  
      Returns:
          Dict[str, Tensor]: The loss of semantic head.
      """
      pass
  
file_path: mmdetection/mmdet/models/seg_heads/base_semantic_head.py
imports: from abc import ABCMeta, abstractmethod
  from typing import Dict, List, Tuple, Union
  import torch.nn.functional
  from mmengine.model import BaseModule
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.utils import ConfigType, OptMultiConfig
label_desc: Use image node_id 3 for calling the BaseSemanticHead obj's underlying member method code with example usage: obj.loss(x, batch_data_samples) without return types