Function eye

  • Creates an identity matrix with the given dimensions.

    Parameters

    • numRows: number

      the number of rows

    • Optional numCols: number

      (optional) the number of columns

    Returns Tensor

    the identity matrix