class_docstr: This class implements a `Mask RCNN style object detector <https://arxiv.org/abs/1703.06870>`
  
  Args:
      opts: command-line arguments
      encoder (BaseImageEncoder): Encoder network (e.g., ResNet or MobileViT)
class_docstr_tok: ["This","class","implements","a","`","Mask","RCNN","style","object","detector","<","https",":","\/\/arxiv.org\/abs\/1703.06870",">","`","Args",":","opts",":","command-line","arguments","encoder","(","BaseImageEncoder",")",":","Encoder","network","(","e.g.",",","ResNet","or","MobileViT",")"]
code: def get_trainable_parameters(
      self,
      weight_decay: float = 0.0,
      no_decay_bn_filter_bias: bool = False,
      *args,
      **kwargs,
  ) -> Tuple[List, List]:
      all_params = []
      all_params_lr = []
  
      # backbone parameters
      if hasattr(self.model.backbone, "get_trainable_parameters"):
          (
              backbone_params,
              backbone_lrs,
          ) = self.model.backbone.get_trainable_parameters(
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name="model.backbone.",
          )
          all_params.extend(backbone_params)
          all_params_lr.extend(backbone_lrs)
      else:
          logger.error(
              "Backbone model must implement get_trainable_parameters function."
          )
  
      # rpn parameters
      rpn_param_list = parameter_list(
          named_parameters=self.model.rpn.named_parameters,
          weight_decay=weight_decay,
          no_decay_bn_filter_bias=no_decay_bn_filter_bias,
          module_name="model.rpn.",
          *args,
          **kwargs,
      )
  
      all_params.extend(rpn_param_list)
      all_params_lr.extend([1.0] * len(rpn_param_list))
  
      # ROI head params
      roi_param_list = parameter_list(
          named_parameters=self.model.roi_heads.named_parameters,
          weight_decay=weight_decay,
          no_decay_bn_filter_bias=no_decay_bn_filter_bias,
          module_name="model.roi_heads.",
          *args,
          **kwargs,
      )
  
      all_params.extend(roi_param_list)
      all_params_lr.extend([1.0] * len(roi_param_list))
  
      return all_params, all_params_lr
  
imports: import argparse
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor, nn
  from torch.nn import functional
  from torchvision.models.detection.anchor_utils import AnchorGenerator
  from torchvision.models.detection.mask_rcnn import MaskRCNN
  from torchvision.ops import MultiScaleRoIAlign
  from cvnets import parameter_list
  from cvnets.layers import ConvLayer2d, Identity
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.detection import DetectionPredTuple
  from cvnets.models.detection.base_detection import BaseDetection
  from cvnets.models.detection.utils.rcnn_utils import FastRCNNConvFCHead, FastRCNNPredictor, MaskRCNNHeads, MaskRCNNPredictor, RPNHead
  from utils import logger
label_desc: Use image node_id 7 for calling the MaskRCNNDetector obj's underlying member method code with example usage: obj.get_trainable_parameters(weight_decay, no_decay_bn_filter_bias) and returns: all_params,  all_params_lr