class_docstr: The Object contextual representation head.
  
  Args:
      num_classes(int): The unique number of target classes.
      in_channels(tuple): The number of input channels.
      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.
class_docstr_tok: ["The","Object","contextual","representation","head",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","in_channels","(","tuple",")",":","The","number","of","input","channels",".","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","."]
docstr: Initialize the parameters of model parts.
docstr_tok: ["Initialize","the","parameters","of","model","parts","."]
code: def init_weight(self):
      """Initialize the parameters of model parts."""
      for sublayer in self.sublayers():
          if isinstance(sublayer, nn.Conv2D):
              param_init.normal_init(sublayer.weight, std=0.001)
          elif isinstance(sublayer, (nn.BatchNorm, nn.SyncBatchNorm)):
              param_init.constant_init(sublayer.weight, value=1.0)
              param_init.constant_init(sublayer.bias, value=0.0)
  
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 OCRHead obj's underlying member method code with example usage: obj.init_weight() without return types