nip.utils.torch.apply_orthogonal_initialisation

nip.utils.torch.apply_orthogonal_initialisation#

nip.utils.torch.apply_orthogonal_initialisation(module: Module, gain: float)[source]#

Apply orthogonal initialisation to a module’s weights and set the biases to 0.

Parameters:
  • module (nn.Module) – The module to which to apply the initialisation.

  • gain (float) – The orthogonal initialisation gain.