class_docstr: The MscaleOCRNet implementation based on PaddlePaddle.
  The original article refers to
  Tao et al. "HIERARCHICAL MULTI-SCALE ATTENTION FOR SEMANTIC SEGMENTATION"
  (https://arxiv.org/pdf/2005.10821.pdf).
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (Paddle.nn.Layer): Backbone network.
      backbone_indices (tuple, optional): Two values in the tuple indicate the indices of output of backbone.
          Default: [0].
      mscale (list): The multiple scales for fusion.
          Default: [0.5, 1.0, 2.0].
      pretrained (str, optional): The path or url of pretrained model. 
          Default: None.
class_docstr_tok: ["The","MscaleOCRNet","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Tao","et","al",".","``","HIERARCHICAL","MULTI-SCALE","ATTENTION","FOR","SEMANTIC","SEGMENTATION","''","(","https",":","\/\/arxiv.org\/pdf\/2005.10821.pdf",")",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","Paddle.nn.Layer",")",":","Backbone","network",".","backbone_indices","(","tuple",",","optional",")",":","Two","values","in","the","tuple","indicate","the","indices","of","output","of","backbone",".","Default",":","[","0","]",".","mscale","(","list",")",":","The","multiple","scales","for","fusion",".","Default",":","[","0.5",",","1.0",",","2.0","]",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def two_scale_forward(self, inputs):
      x_lower = F.interpolate(inputs, scale_factor=0.5, mode="bilinear")
      lower_outs = self._fwd(x_lower)
      pred_05x = lower_outs["pred_out"]
      pred_lower = pred_05x
      aux_lower = lower_outs["aux_out"]
      logit_attn = lower_outs["logit_attn"]
  
      higher_outs = self._fwd(inputs)
      pred_10x = higher_outs["pred_out"]
      pred_higher = pred_10x
      aux_higher = higher_outs["aux_out"]
  
      pred_lower = logit_attn * pred_lower
      aux_lower = logit_attn * aux_lower
      pred_lower = F.interpolate(
          pred_lower,
          size=paddle.shape(pred_higher)[2:4],
          mode="bilinear",
      )
  
      aux_lower = F.interpolate(
          aux_lower,
          size=paddle.shape(pred_higher)[2:4],
          mode="bilinear",
      )
  
      logit_attn = F.interpolate(
          logit_attn,
          size=paddle.shape(pred_higher)[2:4],
          mode="bilinear",
      )
  
      joint_pred = pred_lower + (1 - logit_attn) * pred_higher
      joint_aux = aux_lower + (1 - logit_attn) * aux_higher
      if self.training:
          scaled_pred_05x = F.interpolate(
              pred_05x,
              size=paddle.shape(pred_higher)[2:4],
              mode="bilinear",
          )
          logit_list = [
              joint_aux,
              joint_pred,
              scaled_pred_05x,
              pred_10x,
          ]
      else:
          logit_list = [joint_pred]
      return logit_list
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.models import layers
  from paddleseg.utils import utils
  from paddleseg.cvlibs import manager, param_init
label_desc: Use image node_id 4 for calling the MscaleOCRNet obj's underlying member method code with example usage: obj.two_scale_forward(inputs) and returns: logit_list