class_docstr: Args:
      plan_path (int): The plan path of nnunet.
      num_classes (int): Only for comparative with other models, this param has no function. Default: 0.
      pretrained (str | optional): The path or url of pretrained model. Default: None.
      stage (int | optional): The stage of nnunet, 0 for nnunet_2d and nnunet_3d, 1 for nnunet_cascade stage 2. Default: None.
      cascade (bool | optional): Whether is cascade model. Default: False.
      deep_supervision (bool | optional): Whether return multi-scale feats when training mode. Default: True.
      feat_map_mul_on_downscale (int | optional): The expansion ratio of stage channels. Defatult: 2.
      use_dropout (bool | optional): Whether use dropout layer in model. Default: False.
      upscale_logits (bool | optional): Whether upscale output feats with different resolutions to the same resolution. Defatult: False.
      convolutional_pooling (bool | optional): Whether add pool layer after conv layer. If convolutional_pooling is True, only conv layer is used and reduce resolution by conv stride. Default: False.
      convolutional_upsampling (bool | optional): Use transpose conv layer or interpolate to upsample feature maps. If True, using transpose conv. Default: False.
class_docstr_tok: ["Args",":","plan_path","(","int",")",":","The","plan","path","of","nnunet",".","num_classes","(","int",")",":","Only","for","comparative","with","other","models",",","this","param","has","no","function",".","Default",":","0.","pretrained","(","str","|","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None",".","stage","(","int","|","optional",")",":","The","stage","of","nnunet",",","0","for","nnunet_2d","and","nnunet_3d",",","1","for","nnunet_cascade","stage","2",".","Default",":","None",".","cascade","(","bool","|","optional",")",":","Whether","is","cascade","model",".","Default",":","False",".","deep_supervision","(","bool","|","optional",")",":","Whether","return","multi-scale","feats","when","training","mode",".","Default",":","True",".","feat_map_mul_on_downscale","(","int","|","optional",")",":","The","expansion","ratio","of","stage","channels",".","Defatult",":","2.","use_dropout","(","bool","|","optional",")",":","Whether","use","dropout","layer","in","model",".","Default",":","False",".","upscale_logits","(","bool","|","optional",")",":","Whether","upscale","output","feats","with","different","resolutions","to","the","same","resolution",".","Defatult",":","False",".","convolutional_pooling","(","bool","|","optional",")",":","Whether","add","pool","layer","after","conv","layer",".","If","convolutional_pooling","is","True",",","only","conv","layer","is","used","and","reduce","resolution","by","conv","stride",".","Default",":","False",".","convolutional_upsampling","(","bool","|","optional",")",":","Use","transpose","conv","layer","or","interpolate","to","upsample","feature","maps",".","If","True",",","using","transpose","conv",".","Default",":","False","."]
code: def init_weight(self):
      if self.pretrained is not None:
          utils.load_entire_model(self, self.pretrained)
      else:
          for sublayer in self.sublayers():
              if isinstance(
                  sublayer,
                  (
                      nn.Conv2D,
                      nn.Conv3D,
                      nn.Conv2DTranspose,
                      nn.Conv3DTranspose,
                  ),
              ):
                  param_init.kaiming_normal_init(sublayer.weight)
                  if sublayer.bias is not None:
                      param_init.constant_init(sublayer.bias, value=0)
  
imports: import os
  import sys
  import pickle
  import numpy
  from copy import deepcopy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from medicalseg.cvlibs import manager
  from medicalseg.utils import utils
  from medicalseg.cvlibs import param_init
  from medicalseg.models import layers
  from tools.preprocess_utils import experiment_planner
label_desc: Use image node_id 2 for calling the NNUNet obj's underlying member method code with example usage: obj.init_weight() without return types