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 separates the parameters for backbone and segmentation head, so that
  different learning rates can be used for backbone and segmentation head
docstr_tok: ["This","function","separates","the","parameters","for","backbone","and","segmentation","head",",","so","that","different","learning","rates","can","be","used","for","backbone","and","segmentation","head"]
code: def get_trainable_parameters(
      self,
      weight_decay: Optional[float] = 0.0,
      no_decay_bn_filter_bias: Optional[bool] = False,
      *args,
      **kwargs,
  ):
      """This function separates the parameters for backbone and segmentation head, so that
      different learning rates can be used for backbone and segmentation head
      """
      if getattr(self.encoder, "enable_layer_wise_lr_decay"):
          (
              encoder_params,
              enc_lr_mult,
          ) = self.encoder.get_trainable_parameters(
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name="encoder.",
              *args,
              **kwargs,
          )
      else:
          (
              encoder_params,
              enc_lr_mult,
          ) = self.encoder.get_trainable_parameters(
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name="encoder.",
              *args,
              **kwargs,
          )
      (
          decoder_params,
          dec_lr_mult,
      ) = self.seg_head.get_trainable_parameters(
          weight_decay=weight_decay,
          no_decay_bn_filter_bias=no_decay_bn_filter_bias,
          module_name="seg_head.",
          *args,
          **kwargs,
      )
  
      total_params = sum([p.numel() for p in self.parameters()])
      encoder_params_count = sum(
          [p.numel() for p in self.encoder.parameters()]
      )
      decoder_params_count = sum(
          [p.numel() for p in self.seg_head.parameters()]
      )
  
      assert (
          total_params == encoder_params_count + decoder_params_count
      ), (
          "Total network parameters are not equal to "
          "the sum of encoder and decoder. "
          "{} != {} + {}".format(
              total_params, encoder_params_count, decoder_params_count
          )
      )
  
      return encoder_params + decoder_params, enc_lr_mult + dec_lr_mult
  
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 2 for calling the SegEncoderDecoder obj's underlying member method code with example usage: obj.get_trainable_parameters(weight_decay, no_decay_bn_filter_bias) and returns: unknown,  unknown