xlnstorch.nn.init.constant_

Contents

xlnstorch.nn.init.constant_#

xlnstorch.nn.init.constant_(tensor, value)#

Fills the input tensor with a constant value.

Parameters:
  • tensor (LNSTensor) – The tensor to fill with a constant value.

  • value (float or LNSTensor) – The constant value to fill the tensor with. If a float is provided, the tensor will be filled with that float value. If an LNSTensor is provided, it must be a scalar (i.e., have a single element).