class_docstr: The OCRNet implementation based on PaddlePaddle.
  The differences from OCRNet at OCRNet at paddleseg/models/ocrnet.py are
  
      1. The convolution bias is set to False
  
      2. droput_ rate in SpatialOCRModule is 0.05
  
      3. OCRHead will return `ocr`.
  
      4. Will not Logit_ List size to the original size, when MS_ attention=True
  
  The original article refers to
      Yuan, Yuhui, et al. "Object-Contextual Representations for Semantic Segmentation"
      (https://arxiv.org/pdf/1909.11065.pdf)
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (Paddle.nn.Layer): Backbone network.
      backbone_indices (tuple): A tuple indicates the indices of output of backbone.
          It can be either one or two values, if two values, the first index will be taken as
          a deep-supervision feature in auxiliary layer; the second one will be taken as
          input of pixel representation. If one value, it is taken by both above.
      ocr_mid_channels (int, optional): The number of middle channels in OCRHead. Default: 512.
      ocr_key_channels (int, optional): The number of key channels in ObjectAttentionBlock. Default: 256.
      align_corners (bool): An argument of F.interpolate. It should be set to False when the output size of feature
          is even, e.g. 1024x512, otherwise it is True, e.g. 769x769.  Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","OCRNet","implementation","based","on","PaddlePaddle",".","The","differences","from","OCRNet","at","OCRNet","at","paddleseg\/models\/ocrnet.py","are","1",".","The","convolution","bias","is","set","to","False","2.","droput_","rate","in","SpatialOCRModule","is","0.05","3",".","OCRHead","will","return","`","ocr","`",".","4",".","Will","not","Logit_","List","size","to","the","original","size",",","when","MS_","attention=True","The","original","article","refers","to","Yuan",",","Yuhui",",","et","al",".","``","Object-Contextual","Representations","for","Semantic","Segmentation","''","(","https",":","\/\/arxiv.org\/pdf\/1909.11065.pdf",")","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","Paddle.nn.Layer",")",":","Backbone","network",".","backbone_indices","(","tuple",")",":","A","tuple","indicates","the","indices","of","output","of","backbone",".","It","can","be","either","one","or","two","values",",","if","two","values",",","the","first","index","will","be","taken","as","a","deep-supervision","feature","in","auxiliary","layer",";","the","second","one","will","be","taken","as","input","of","pixel","representation",".","If","one","value",",","it","is","taken","by","both","above",".","ocr_mid_channels","(","int",",","optional",")",":","The","number","of","middle","channels","in","OCRHead",".","Default",":","512.","ocr_key_channels","(","int",",","optional",")",":","The","number","of","key","channels","in","ObjectAttentionBlock",".","Default",":","256.","align_corners","(","bool",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","output","size","of","feature","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def init_weight(self):
      if self.pretrained is not None:
          utils.load_entire_model(self, self.pretrained)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg import utils
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
label_desc: Use image node_id 3 for calling the OCRNetNV obj's underlying member method code with example usage: obj.init_weight() without return types