class_docstr: Cascade Encoder Decoder segmentors.
  
  CascadeEncoderDecoder almost the same as EncoderDecoder, while decoders of
  CascadeEncoderDecoder are cascaded. The output of previous decoder_head
  will be the input of next decoder_head.
class_docstr_tok: ["Cascade","Encoder","Decoder","segmentors",".","CascadeEncoderDecoder","almost","the","same","as","EncoderDecoder",",","while","decoders","of","CascadeEncoderDecoder","are","cascaded",".","The","output","of","previous","decoder_head","will","be","the","input","of","next","decoder_head","."]
code: def __init__(
      self,
      num_stages,
      backbone,
      decode_head,
      neck=None,
      auxiliary_head=None,
      train_cfg=None,
      test_cfg=None,
      pretrained=None,
  ):
      self.num_stages = num_stages
      super(CascadeEncoderDecoder, self).__init__(
          backbone=backbone,
          decode_head=decode_head,
          neck=neck,
          auxiliary_head=auxiliary_head,
          train_cfg=train_cfg,
          test_cfg=test_cfg,
          pretrained=pretrained,
      )
  
file_path: lavis/lavis/common/annotator/uniformer/mmseg/models/segmentors/cascade_encoder_decoder.py
imports: from torch import nn
  from annotator.uniformer.mmseg.core import add_prefix
  from annotator.uniformer.mmseg.ops import resize
  from ..None import builder
  from ..builder import SEGMENTORS
  from .encoder_decoder import EncoderDecoder
label_desc: Use image node_id 1 to create a new CascadeEncoderDecoder object from inherited base classes: EncoderDecoder with example: obj = CascadeEncoderDecoder(num_stages, backbone, decode_head, neck, auxiliary_head, train_cfg, test_cfg, pretrained)