EyeLike¶
EyeLike - 22¶
版本¶
- 名称: EyeLike (GitHub) 
- 域: - main
- 起始版本: - 22
- 函数: - False
- 支持级别: - SupportType.COMMON
- 形状推断: - True
此版本的运算符自 版本 22 起可用。
摘要¶
生成一个 2D 张量(矩阵),对角线上为 1,其他地方为 0。仅支持 2D 张量,即输入 T1 必须是秩为 2 的张量。输出张量的形状与输入张量相同。数据类型可以通过“dtype”参数指定。如果未指定“dtype”,则使用输入张量的类型。默认情况下,主对角线上填充 1,但可以使用属性“k”填充上对角线或下对角线。“dtype”参数必须是 TensorProto 消息中“DataType”枚举字段中指定的数据类型之一,并且必须是有效的输出类型。
属性¶
- dtype - INT : - (可选)输出张量元素的 DataTypes。如果未指定,则使用输入张量 T1 的数据类型。 
- k - INT (默认值为 - '0')- (可选)填充 1 的对角线索引。默认值为 0。如果 T2 是输出,此操作将 T2[i, i+k] = 1。k = 0 填充主对角线,k > 0 填充上对角线,k < 0 填充下对角线。 
输入¶
- 输入(异构)- T1 - 用于复制形状以及可选的类型信息的 2D 输入张量。 
输出¶
- 输出(异构)- 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 起可用。
摘要¶
生成一个 2D 张量(矩阵),对角线上为 1,其他地方为 0。仅支持 2D 张量,即输入 T1 必须是秩为 2 的张量。输出张量的形状与输入张量相同。数据类型可以通过“dtype”参数指定。如果未指定“dtype”,则使用输入张量的类型。默认情况下,主对角线上填充 1,但可以使用属性“k”填充上对角线或下对角线。“dtype”参数必须是 TensorProto 消息中“DataType”枚举字段中指定的数据类型之一,并且必须是有效的输出类型。
属性¶
- dtype - INT : - (可选)输出张量元素的 DataTypes。如果未指定,则使用输入张量 T1 的数据类型。如果输入张量 T1 也未指定,则类型默认为“float”。 
- k - INT (默认值为 - '0')- (可选)填充 1 的对角线索引。默认值为 0。如果 T2 是输出,此操作将 T2[i, i+k] = 1。k = 0 填充主对角线,k > 0 填充上对角线,k < 0 填充下对角线。 
输入¶
- 输入(异构)- T1 - 用于复制形状以及可选的类型信息的 2D 输入张量。 
输出¶
- 输出(异构)- 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))- 限制输出类型。不支持字符串和复数。