ConstantOfShape¶
ConstantOfShape - 23¶
版本¶
域:
main
始于版本:
23
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符已可用始于版本 23。
摘要¶
生成具有给定值和形状的张量。
属性¶
value - 张量 :
(可选) 输出元素的数值。应为一个单元素张量。如果未指定,则默认为值为 0、数据类型为 float32 的张量
输入¶
input (异构) - T1
一维张量。预期输出张量的形状。如果给定空张量,则输出为标量。所有值必须 >= 0。
输出¶
output (异构) - T2
形状由 'input' 指定的输出张量。如果指定了属性 'value',则输出张量的值和数据类型取自 'value'。如果未指定属性 'value',则输出中的值默认为 0,数据类型默认为 float32。
类型约束¶
T1 在 (
tensor(int64)
) 中约束输入类型。
T2 在 (
tensor(bfloat16)
,tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(float4e2m1)
,tensor(float8e4m3fn)
,tensor(float8e4m3fnuz)
,tensor(float8e5m2)
,tensor(float8e5m2fnuz)
,tensor(int16)
,tensor(int32)
,tensor(int4)
,tensor(int64)
,tensor(int8)
,tensor(uint16)
,tensor(uint32)
,tensor(uint4)
,tensor(uint64)
,tensor(uint8)
) 中约束输出类型为数值或布尔值。
ConstantOfShape - 21¶
版本¶
域:
main
始于版本:
21
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符已可用始于版本 21。
摘要¶
生成具有给定值和形状的张量。
属性¶
value - 张量 :
(可选) 输出元素的数值。应为一个单元素张量。如果未指定,则默认为值为 0、数据类型为 float32 的张量
输入¶
input (异构) - T1
一维张量。预期输出张量的形状。如果给定空张量,则输出为标量。所有值必须 >= 0。
输出¶
output (异构) - T2
形状由 'input' 指定的输出张量。如果指定了属性 'value',则输出张量的值和数据类型取自 'value'。如果未指定属性 'value',则输出中的值默认为 0,数据类型默认为 float32。
类型约束¶
T1 在 (
tensor(int64)
) 中约束输入类型。
T2 在 (
tensor(bfloat16)
,tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(float8e4m3fn)
,tensor(float8e4m3fnuz)
,tensor(float8e5m2)
,tensor(float8e5m2fnuz)
,tensor(int16)
,tensor(int32)
,tensor(int4)
,tensor(int64)
,tensor(int8)
,tensor(uint16)
,tensor(uint32)
,tensor(uint4)
,tensor(uint64)
,tensor(uint8)
) 中约束输出类型为数值或布尔值。
ConstantOfShape - 20¶
版本¶
域:
main
始于版本:
20
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符已可用始于版本 20。
摘要¶
生成具有给定值和形状的张量。
属性¶
value - 张量 :
(可选) 输出元素的数值。应为一个单元素张量。如果未指定,则默认为值为 0、数据类型为 float32 的张量
输入¶
input (异构) - T1
一维张量。预期输出张量的形状。如果给定空张量,则输出为标量。所有值必须 >= 0。
输出¶
output (异构) - T2
形状由 'input' 指定的输出张量。如果指定了属性 'value',则输出张量的值和数据类型取自 'value'。如果未指定属性 'value',则输出中的值默认为 0,数据类型默认为 float32。
类型约束¶
T1 在 (
tensor(int64)
) 中约束输入类型。
T2 在 (
tensor(bfloat16)
,tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(float8e4m3fn)
,tensor(float8e4m3fnuz)
,tensor(float8e5m2)
,tensor(float8e5m2fnuz)
,tensor(int16)
,tensor(int32)
,tensor(int64)
,tensor(int8)
,tensor(uint16)
,tensor(uint32)
,tensor(uint64)
,tensor(uint8)
) 中约束输出类型为数值。
ConstantOfShape - 9¶
版本¶
域:
main
始于版本:
9
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符已可用始于版本 9。
摘要¶
生成具有给定值和形状的张量。
属性¶
value - 张量 :
(可选) 输出元素的数值。应为一个单元素张量。如果未指定,则默认为值为 0、数据类型为 float32 的张量
输入¶
input (异构) - T1
一维张量。预期输出张量的形状。如果给定空张量,则输出为标量。所有值必须 >= 0。
输出¶
output (异构) - T2
形状由 'input' 指定的输出张量。如果指定了属性 'value',则输出张量的值和数据类型取自 'value'。如果未指定属性 'value',则输出中的值默认为 0,数据类型默认为 float32。
类型约束¶
T1 在 (
tensor(int64)
) 中约束输入类型。
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)
) 中约束输出类型为数值。