nnsvs.util.init_weights

nnsvs.util.init_weights(net, init_type='normal', init_gain=0.02)[source]

Initialize network weights.

Parameters:
  • net (torch.nn.Module) – network to initialize

  • init_type (str) – the name of an initialization method: normal | xavier | kaiming | orthogonal | none.

  • init_gain (float) – scaling factor for normal, xavier and orthogonal.