ConstantOfShape
Description
Generates a tensor with a given value and shape.
Input
x: 1D Tensor of type int64, indicating the shape of the output data. All values must be greater than 0.
Attribute
value (optional): specifies the data and type of the output tensor. The value must be a single-element tensor. If this parameter is not specified, the value is 0 and the data type is float32 by default.
Output
y: output tensor of shape specified by x. If value is specified, the value and data type of the output tensor is taken from value. If value is not specified, the value in the output defaults to 0, and the data type defaults to float32.
Constraints
None.
ONNX Opset Support
Opset v8/v9/v10/v11/v12/v13/v14/v15/v16
Parent topic: Supported ONNX Operators