class_docstr: This class defines the segmentation head in `PSPNet architecture <https://arxiv.org/abs/1612.01105>`_
  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/pspnet.py
imports: import argparse
  from typing import Dict, Optional
  from torch import Tensor
  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 PSP
label_desc: Use image node_id 2 for calling the PSPNet obj's underlying member method code with example usage: obj.update_classifier(opts, n_classes) without return types