xlnstorch.nn.init.xavier_normal_

Contents

xlnstorch.nn.init.xavier_normal_#

xlnstorch.nn.init.xavier_normal_(tensor, gain=1.0, generator=None)#

Fills the input tensor with values according to the Xavier normal initialization.

Parameters:
  • tensor (LNSTensor) – The tensor to fill with values.

  • gain (float, optional) – An optional scaling factor (default is 1.0).

  • generator (torch.Generator, optional) – A random number generator to use for reproducibility (default is None).

Returns:

The input tensor filled with values from the Xavier normal distribution.

Return type:

LNSTensor