code: def init_net(net, w_type, b_type):
      """
      Init network with various algorithms
      :param net:
      :param w_type:
      :param b_type:
      :return:
      """
      if w_type == "none":
          pass
      elif w_type == "xavier":
          net.apply(_init_weights_vs)
      elif w_type == "kaiming":
          net.apply(_init_weights_he)
      elif w_type == "zero":
          net.apply(_init_weights_zero)
      else:
          raise NotImplementedError(
              f"init_type={w_type} is not supported."
          )
  
      if b_type == "none":
          pass
      elif b_type == "xavier":
          net.apply(_init_bias_vs)
      elif b_type == "kaiming":
          net.apply(_init_bias_he)
      elif b_type == "zero":
          net.apply(_init_bias_zero)
      else:
          raise NotImplementedError(
              f"init_type={b_type} is not supported."
          )
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/src/search_space/utils/weight_initializers.py
imports: import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: init_net(net, w_type, b_type) without return types