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: Test without Augmentation.
  
  Args:
      x (Union[Tensor, Tuple[Tensor]]): Feature maps.
      batch_img_metas (List[dict]): List of image information.
      rescale (bool): Whether to rescale the results.
          Defaults to False.
  
  Returns:
      list[Tensor]: semantic segmentation logits.
docstr_tok: ["Test","without","Augmentation",".","Args",":","x","(","Union","[","Tensor",",","Tuple","[","Tensor","]","]",")",":","Feature","maps",".","batch_img_metas","(","List","[","dict","]",")",":","List","of","image","information",".","rescale","(","bool",")",":","Whether","to","rescale","the","results",".","Defaults","to","False",".","Returns",":","list","[","Tensor","]",":","semantic","segmentation","logits","."]
code: def predict(
      self,
      x: Union[Tensor, Tuple[Tensor]],
      batch_img_metas: List[dict],
      rescale: bool = False,
  ) -> List[Tensor]:
      """Test without Augmentation.
  
      Args:
          x (Union[Tensor, Tuple[Tensor]]): Feature maps.
          batch_img_metas (List[dict]): List of image information.
          rescale (bool): Whether to rescale the results.
              Defaults to False.
  
      Returns:
          list[Tensor]: semantic segmentation logits.
      """
      seg_preds = self.forward(x)["seg_preds"]
      seg_preds = F.interpolate(
          seg_preds,
          size=batch_img_metas[0]["batch_input_shape"],
          mode="bilinear",
          align_corners=False,
      )
      seg_preds = [seg_preds[i] for i in range(len(batch_img_metas))]
  
      if rescale:
          seg_pred_list = []
          for i in range(len(batch_img_metas)):
              h, w = batch_img_metas[i]["img_shape"]
              seg_pred = seg_preds[i][:, :h, :w]
  
              h, w = batch_img_metas[i]["ori_shape"]
              seg_pred = F.interpolate(
                  seg_pred[None],
                  size=(h, w),
                  mode="bilinear",
                  align_corners=False,
              )[0]
              seg_pred_list.append(seg_pred)
      else:
          seg_pred_list = seg_preds
  
      return seg_pred_list
  
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 4 for calling the BaseSemanticHead obj's underlying member method code with example usage: obj.predict(x, batch_img_metas, rescale) and returns: seg_pred_list