class_docstr: This class defines the segmentation head in `DeepLabv3 architecture <https://arxiv.org/abs/1706.05587>`_
  Args:
      opts: command-line arguments
      enc_conf (Dict): Encoder input-output configuration at each spatial level
      use_l5_exp (Optional[bool]): Use features from expansion layer in Level5 in the encoder
class_docstr_tok: ["This","class","defines","the","segmentation","head","in","`","DeepLabv3","architecture","<","https",":","\/\/arxiv.org\/abs\/1706.05587",">","`","_","Args",":","opts",":","command-line","arguments","enc_conf","(","Dict",")",":","Encoder","input-output","configuration","at","each","spatial","level","use_l5_exp","(","Optional","[","bool","]",")",":","Use","features","from","expansion","layer","in","Level5","in","the","encoder"]
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.
      """
      in_channels = self.classifier.in_channels
      conv_layer = ConvLayer2d(
          opts=opts,
          in_channels=in_channels,
          out_channels=n_classes,
          kernel_size=1,
          stride=1,
          use_norm=False,
          use_act=False,
          bias=True,
      )
      initialize_weights(opts, modules=conv_layer)
      self.classifier = conv_layer
  
file_path: ml-cvnets/cvnets/models/segmentation/heads/deeplabv3.py
imports: import argparse
  from typing import Dict, Optional, Tuple
  from torch import Tensor, nn
  from cvnets.layers import ConvLayer2d
  from cvnets.misc.init_utils import initialize_weights
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.segmentation.heads.base_seg_head import BaseSegHead
  from cvnets.modules import ASPP
  from options.parse_args import JsonValidator
label_desc: Use image node_id 2 for calling the DeeplabV3 obj's underlying member method code with example usage: obj.update_classifier(opts, n_classes) without return types