xlnstorch.nn.init.eye_

Contents

xlnstorch.nn.init.eye_#

xlnstorch.nn.init.eye_(tensor)#

Fills the input 2D tensor with ones on the diagonal and zeros elsewhere.

Parameters:

tensor (LNSTensor) – The 2D tensor to fill with the identity matrix.

Returns:

The input tensor filled with the identity matrix.

Return type:

LNSTensor