code: def th_multihead_fill(layer, qkv_same_embed_dim=False):
      def _init_param_as_combined_linear_weight(p):
          bound = math.sqrt(6 / (3 * p.shape[0] + p.shape[1]))
          paddle.nn.initializer.Uniform(low=-bound, high=bound)(p)
  
      if qkv_same_embed_dim:
          _init_param_as_combined_linear_weight(layer.q_proj.weight)
          _init_param_as_combined_linear_weight(layer.k_proj.weight)
          _init_param_as_combined_linear_weight(layer.v_proj.weight)
          param_init.xavier_uniform(layer.out_proj.weight)
      else:
          for p in layer.parameters():
              if p.dim() > 1:
                  param_init.xavier_uniform(p)
  
file_path: PaddleSeg/contrib/PanopticSeg/paddlepanseg/models/param_init.py
imports: import math
  import paddle
  from paddleseg.cvlibs import param_init
label_desc: Use image node_id 3 for calling a global function with example usage: th_multihead_fill(layer, qkv_same_embed_dim) without return types