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","."]
code: def __init__(
      self,
      backbone,
      decode_head,
      neck=None,
      auxiliary_head=None,
      train_cfg=None,
      test_cfg=None,
      pretrained=None,
  ):
      super(EncoderDecoder, self).__init__()
      self.backbone = builder.build_backbone(backbone)
      if neck is not None:
          self.neck = builder.build_neck(neck)
      self._init_decode_head(decode_head)
      self._init_auxiliary_head(auxiliary_head)
  
      self.train_cfg = train_cfg
      self.test_cfg = test_cfg
  
      self.init_weights(pretrained=pretrained)
  
      assert self.with_decode_head
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from annotator.uniformer.mmseg.core import add_prefix
  from annotator.uniformer.mmseg.ops import resize
  from ..None import builder
  from ..builder import SEGMENTORS
  from .base import BaseSegmentor
label_desc: Use image node_id 1 to create a new EncoderDecoder object from inherited base classes: BaseSegmentor with example: obj = EncoderDecoder(backbone, decode_head, neck, auxiliary_head, train_cfg, test_cfg, pretrained)