code: def init_weight(self):
      for layer in self.sublayers():
          if isinstance(layer, nn.Conv2D):
              if hasattr(layer, "weight_orig"):
                  param = layer.weight_orig
              else:
                  param = layer.weight
              param_init.xavier_uniform(param)
  
          elif isinstance(layer, (nn.BatchNorm, nn.SyncBatchNorm)):
              param_init.constant_init(layer.weight, value=1.0)
              param_init.constant_init(layer.bias, value=0.0)
  
          elif isinstance(layer, BasicBlock):
              param_init.constant_init(layer.bn2.weight, value=0.0)
  
      if self.pretrained is not None:
          utils.load_pretrained_model(self, self.pretrained)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.utils import utils
  from ppmatting.models.layers import GuidedCxtAtten
label_desc: Use image node_id 4 for calling the ResNet_D obj's underlying member method code with example usage: obj.init_weight() without return types