EyeLike

EyeLike - 22

版本

  • 名称: EyeLike (GitHub)

  • : main

  • 起始版本: 22

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的运算符自 版本 22 起可用。

摘要

生成一个二维张量(矩阵),对角线上为一,其他地方为零。仅支持二维张量,即输入 T1 必须是秩为 2 的张量。输出张量的形状与输入张量相同。数据类型可以通过“dtype”参数指定。如果未指定“dtype”,则使用输入张量的类型。默认情况下,主对角线填充为一,但属性“k”可用于填充上对角线或下对角线。“dtype”参数必须是 TensorProto 消息中“DataType”枚举字段中指定的数据类型之一,并且作为输出类型有效。

属性

  • dtype - INT :

    (可选)输出张量元素的Dtype。如果未指定,则使用输入张量 T1 的Dtype。

  • k - INT (默认为 '0')

    (可选)填充为一的对角线索引。默认值为 0。如果 T2 是输出,则此操作将 T2[i, i+k] = 1。k = 0 填充主对角线,k > 0 填充上对角线,k < 0 填充下对角线。

输入

  • input (异构) - T1

    用于复制形状以及(可选)类型信息的二维输入张量。

输出

  • output (异构) - T2

    输出张量,与输入张量 T1 形状相同。

类型约束

  • T1 属于 ( tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制输入类型。不支持字符串和复数。

  • T2 属于 ( tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制输出类型。不支持字符串和复数。

EyeLike - 9

版本

  • 名称: EyeLike (GitHub)

  • : main

  • 起始版本: 9

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的运算符自 版本 9 起可用。

摘要

生成一个二维张量(矩阵),对角线上为一,其他地方为零。仅支持二维张量,即输入 T1 必须是秩为 2 的张量。输出张量的形状与输入张量相同。数据类型可以通过“dtype”参数指定。如果未指定“dtype”,则使用输入张量的类型。默认情况下,主对角线填充为一,但属性“k”可用于填充上对角线或下对角线。“dtype”参数必须是 TensorProto 消息中“DataType”枚举字段中指定的数据类型之一,并且作为输出类型有效。

属性

  • dtype - INT :

    (可选)输出张量元素的Dtype。如果未指定,则使用输入张量 T1 的Dtype。如果输入张量 T1 也未指定,则类型默认为“float”。

  • k - INT (默认为 '0')

    (可选)填充为一的对角线索引。默认值为 0。如果 T2 是输出,则此操作将 T2[i, i+k] = 1。k = 0 填充主对角线,k > 0 填充上对角线,k < 0 填充下对角线。

输入

  • input (异构) - T1

    用于复制形状以及(可选)类型信息的二维输入张量。

输出

  • output (异构) - T2

    输出张量,与输入张量 T1 形状相同。

类型约束

  • T1 属于 ( tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制输入类型。不支持字符串和复数。

  • T2 属于 ( tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制输出类型。不支持字符串和复数。