Skip to main content

//clika-runtime/io.clika.runtime/Ops/eye

eye

[common]
fun eye(n: Tensor, m: Tensor? = null, dtype: DType = DType.FLOAT32, device: Placement? = null): Tensor

eye(n: Tensor, m: Tensor? = null, dtype: DType = DType.FLOAT32, device: Placement? = null): the eye operator. A 2-D identity matrix [n, m]: 1 on the diagonal, 0 elsewhere; m defaults to n (square).

[common]
fun eye(n: Double, m: Tensor? = null, dtype: DType = DType.FLOAT32, device: Placement? = null): Tensor

eye(n: Double, m: Tensor? = null, dtype: DType = DType.FLOAT32, device: Placement? = null): the number form of eye, n as a scalar.