ConstantOfShape¶
ConstantOfShape - 23¶
Version¶
name: ConstantOfShape (GitHub)
domain:
main
since_version:
23
function:
False
support_level:
SupportType.COMMON
shape inference:
True
This version of the operator has been available since version 23.
Summary¶
Generate a tensor with given value and shape.
Attributes¶
value - TENSOR :
(Optional) The value of the output elements.Should be a one-element tensor. If not specified, it defaults to a tensor of value 0 and datatype float32
Inputs¶
input (heterogeneous) - T1:
1D tensor. The shape of the expected output tensor. If empty tensor is given, the output would be a scalar. All values must be >= 0.
Outputs¶
output (heterogeneous) - T2:
Output tensor of shape specified by ‘input’.If attribute ‘value’ is specified, the value and datatype of the output tensor is taken from ‘value’.If attribute ‘value’ is not specified, the value in the output defaults to 0, and the datatype defaults to float32.
Type Constraints¶
T1 in (
tensor(int64)
):Constrain input types.
T2 in (
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)
):Constrain output types to be numerics or boolean.
ConstantOfShape - 21¶
Version¶
name: ConstantOfShape (GitHub)
domain:
main
since_version:
21
function:
False
support_level:
SupportType.COMMON
shape inference:
True
This version of the operator has been available since version 21.
Summary¶
Generate a tensor with given value and shape.
Attributes¶
value - TENSOR :
(Optional) The value of the output elements.Should be a one-element tensor. If not specified, it defaults to a tensor of value 0 and datatype float32
Inputs¶
input (heterogeneous) - T1:
1D tensor. The shape of the expected output tensor. If empty tensor is given, the output would be a scalar. All values must be >= 0.
Outputs¶
output (heterogeneous) - T2:
Output tensor of shape specified by ‘input’.If attribute ‘value’ is specified, the value and datatype of the output tensor is taken from ‘value’.If attribute ‘value’ is not specified, the value in the output defaults to 0, and the datatype defaults to float32.
Type Constraints¶
T1 in (
tensor(int64)
):Constrain input types.
T2 in (
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)
):Constrain output types to be numerics or boolean.
ConstantOfShape - 20¶
Version¶
name: ConstantOfShape (GitHub)
domain:
main
since_version:
20
function:
False
support_level:
SupportType.COMMON
shape inference:
True
This version of the operator has been available since version 20.
Summary¶
Generate a tensor with given value and shape.
Attributes¶
value - TENSOR :
(Optional) The value of the output elements.Should be a one-element tensor. If not specified, it defaults to a tensor of value 0 and datatype float32
Inputs¶
input (heterogeneous) - T1:
1D tensor. The shape of the expected output tensor. If empty tensor is given, the output would be a scalar. All values must be >= 0.
Outputs¶
output (heterogeneous) - T2:
Output tensor of shape specified by ‘input’.If attribute ‘value’ is specified, the value and datatype of the output tensor is taken from ‘value’.If attribute ‘value’ is not specified, the value in the output defaults to 0, and the datatype defaults to float32.
Type Constraints¶
T1 in (
tensor(int64)
):Constrain input types.
T2 in (
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)
):Constrain output types to be numerics.
ConstantOfShape - 9¶
Version¶
name: ConstantOfShape (GitHub)
domain:
main
since_version:
9
function:
False
support_level:
SupportType.COMMON
shape inference:
True
This version of the operator has been available since version 9.
Summary¶
Generate a tensor with given value and shape.
Attributes¶
value - TENSOR :
(Optional) The value of the output elements.Should be a one-element tensor. If not specified, it defaults to a tensor of value 0 and datatype float32
Inputs¶
input (heterogeneous) - T1:
1D tensor. The shape of the expected output tensor. If empty tensor is given, the output would be a scalar. All values must be >= 0.
Outputs¶
output (heterogeneous) - T2:
Output tensor of shape specified by ‘input’.If attribute ‘value’ is specified, the value and datatype of the output tensor is taken from ‘value’.If attribute ‘value’ is not specified, the value in the output defaults to 0, and the datatype defaults to float32.
Type Constraints¶
T1 in (
tensor(int64)
):Constrain input types.
T2 in (
tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int16)
,tensor(int32)
,tensor(int64)
,tensor(int8)
,tensor(uint16)
,tensor(uint32)
,tensor(uint64)
,tensor(uint8)
):Constrain output types to be numerics.