Create a square 2D identity Tensor.
This is similar to the eye API of other tensor frameworks.
eye
// 128x128 identity tensor const t = sm.identity(128)
A new identity Tensor.
The dimension of the output Tensor
Generated using TypeDoc
Create a square 2D identity Tensor.
Remarks
This is similar to the
eye
API of other tensor frameworks.Example
Returns
A new identity Tensor.