class_docstr: Encoder Decoder segmentors.
  
  EncoderDecoder typically consists of backbone, decode_head, auxiliary_head.
  Note that auxiliary_head is only used for deep supervision during training,
  which could be dumped during inference.
class_docstr_tok: ["Encoder","Decoder","segmentors",".","EncoderDecoder","typically","consists","of","backbone",",","decode_head",",","auxiliary_head",".","Note","that","auxiliary_head","is","only","used","for","deep","supervision","during","training",",","which","could","be","dumped","during","inference","."]
docstr: Inference with full image.
docstr_tok: ["Inference","with","full","image","."]
code: def whole_inference(self, img, img_meta, rescale):
      """Inference with full image."""
  
      seg_logit = self.encode_decode(img, img_meta)
      if rescale:
          # support dynamic shape for onnx
          if torch.onnx.is_in_onnx_export():
              size = img.shape[2:]
          else:
              size = img_meta[0]["ori_shape"][:2]
          seg_logit = resize(
              seg_logit,
              size=size,
              mode="bilinear",
              align_corners=self.align_corners,
              warning=False,
          )
  
      return seg_logit
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmseg.core import add_prefix
  from mmseg.models import builder
  from mmseg.models.builder import SEGMENTORS
  from mmseg.models.segmentors.base import BaseSegmentor
  from mmseg.ops import resize
label_desc: Use image node_id 12 for calling the EncoderDecoderMask2Former obj's underlying member method code with example usage: obj.whole_inference(img, img_meta, rescale) and returns: seg_logit