emmi.functional.init¶
Attributes¶
Functions¶
|
Initialize the bias tensor of a nn.Module instance to zero. |
|
Initialize the weight tensor of a nn.Module instance using the truncated normal initialization with a zero bias vector. |
Module Contents¶
- emmi.functional.init.ALL_CONVS¶
- emmi.functional.init.ALL_LAYERS¶
- emmi.functional.init.init_bias_to_zero(layer_module)¶
Initialize the bias tensor of a nn.Module instance to zero.
- Parameters:
layer_module (torch.nn.Module) – An nn.Module instance, either a Linear or Conv layer.
- Return type:
None
- emmi.functional.init.init_trunc_normal_zero_bias(layer_module, std=0.02)¶
Initialize the weight tensor of a nn.Module instance using the truncated normal initialization with a zero bias vector.
- Parameters:
layer_module (torch.nn.Module) – An nn.Module instance, either a Linear or Conv layer.
std (float) – Standard Deviation value of the normal distribution to sample weights from. Defaults to 0.02.
- Return type:
None