Initializing Module Parameters#
The xlnstorch.nn.init module provides functions to initialize the parameters
of layers in the xlnstorch.nn module. These functions modify the input
LNSTensor in-place and are analogous to the torch.nn.init functions.
|
Fills the input tensor with random numbers from a uniform distribution. |
|
Fills the input tensor with random numbers from a normal distribution. |
|
Fills the input tensor with zeros. |
|
Fills the input tensor with ones. |
|
Fills the input tensor with a constant value. |
|
Fills the input 2D tensor with ones on the diagonal and zeros elsewhere. |
|
Fills the input tensor with values according to the Xavier uniform initialization. |
|
Fills the input tensor with values according to the Xavier normal initialization. |