xlnstorch.nn.init.uniform_

Contents

xlnstorch.nn.init.uniform_#

xlnstorch.nn.init.uniform_(tensor, a=0.0, b=1.0, generator=None)#

Fills the input tensor with random numbers from a uniform distribution.

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

  • a (float, optional) – The lower bound of the uniform distribution (default is 0.0).

  • b (float, optional) – The upper bound of the uniform distribution (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 random numbers from the uniform distribution.

Return type:

LNSTensor