code: def __init__(
      self,
      num_classes,
      backbone,
      backbone_indices,
      n_scales=[0.5, 1.0, 2.0],
      ocr_mid_channels=512,
      ocr_key_channels=256,
      align_corners=False,
      pretrained=None,
  ):
      super().__init__()
      self.ocrnet = OCRNetNV(
          num_classes,
          backbone,
          backbone_indices,
          ocr_mid_channels=ocr_mid_channels,
          ocr_key_channels=ocr_key_channels,
          align_corners=align_corners,
          ms_attention=True,
      )
      self.scale_attn = AttenHead(in_ch=ocr_mid_channels, out_ch=1)
  
      self.n_scales = n_scales
      self.pretrained = pretrained
      self.align_corners = align_corners
  
      if self.pretrained is not None:
          utils.load_pretrained_model(self, self.pretrained)
  
imports: import math
  import paddle
  import paddle.nn
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.utils import utils
  from paddleseg.models import layers
  from .ocrnet_nv import OCRNetNV
label_desc: Use image node_id 1 to create a new MscaleOCRNet object from inherited base classes: nn with example: obj = MscaleOCRNet(num_classes, backbone, backbone_indices, n_scales, ocr_mid_channels, ocr_key_channels, align_corners, pretrained)