class_docstr: This class defines a encoder-decoder architecture for the task of semantic segmentation. Different segmentation
  heads (e.g., PSPNet and DeepLabv3) can be used
  
  Args:
      opts: command-line arguments
      encoder (BaseImageEncoder): Backbone network (e.g., MobileViT or ResNet)
class_docstr_tok: ["This","class","defines","a","encoder-decoder","architecture","for","the","task","of","semantic","segmentation",".","Different","segmentation","heads","(","e.g.",",","PSPNet","and","DeepLabv3",")","can","be","used","Args",":","opts",":","command-line","arguments","encoder","(","BaseImageEncoder",")",":","Backbone","network","(","e.g.",",","MobileViT","or","ResNet",")"]
docstr: This function updates the classification layer in a model. Useful for finetuning purposes.
docstr_tok: ["This","function","updates","the","classification","layer","in","a","model",".","Useful","for","finetuning","purposes","."]
code: def update_classifier(self, opts, n_classes: int) -> None:
      """
      This function updates the classification layer in a model. Useful for finetuning purposes.
      """
      if hasattr(self.seg_head, "update_classifier"):
          self.seg_head.update_classifier(opts, n_classes)
  
file_path: ml-cvnets/cvnets/models/segmentation/enc_dec.py
imports: import argparse
  from typing import Dict, Optional, Tuple, Union
  from torch import Tensor
  from cvnets.models import MODEL_REGISTRY, BaseAnyNNModel, get_model
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.segmentation.base_seg import BaseSegmentation, set_model_specific_opts_before_model_building, unset_model_specific_opts_after_model_building
label_desc: Use image node_id 4 for calling the SegEncoderDecoder obj's underlying member method code with example usage: obj.update_classifier(opts, n_classes) without return types