ConstantOfShape
Description
Generates a tensor with the given value and shape.
Input
One input:
x: 1D tensor of type int64, indicating the shape of the output data. All values must be greater than 0.
Output
One output:
y: tensor. The shape is specified by the input. If value is specified, the output value and data type are the same as those specified by value. If value is not specified, the value of the output tensor is 0 by default, and the data type is float by default.
Attribute
value: specifies the data and type of the output tensor. The default output type is float.
Constraints
x: 1<=len(shape)<=8.
ONNX Opset Support
Opset v8/v9/v10/v11/v12/v13/v14/v15/v16
Parent topic: Operators Specifications of the AI Framework