code: def init_net(net, init_type="normal", init_gain=0.02, gpu_ids=[]):
      if len(gpu_ids) > 0:
          assert torch.cuda.is_available()
          net.to(gpu_ids[0])
          net = torch.nn.DataParallel(net, gpu_ids)  # multi-GPUs
      init_weights(net, init_type, init_gain=init_gain)
      return net
  
file_path: pifuhd/lib/net_util.py
imports: import torch
  from torch.nn import init
  import torch.nn
  import torch.nn.functional
  import functools
label_desc: Use image node_id 4 for calling a global function with example usage: init_net(net, init_type, init_gain, gpu_ids) and returns: net