Cumsum
Description
Computes the cumulative sum of the input tensor on the given axis. The cumulative sum is performed on the input elements along the given axis.
Input
- x: input tensor of type float16, float, or int32.
- axis: a 0-dimensional vector of type int32 or int64. The value range is [–r, r – 1]. The default value is 0. A negative value indicates that the dimension is calculated from the end. r indicates the number of dimensions of the input data x.
Attribute
- exclusive: The data type is int. The default value is 0, indicating that the sum of top-level elements is returned. If this parameter is set to 1, the sum of top-level elements is not returned.
- reverse: The data type is int. The default value is 0, indicating forward summation. If this parameter is set to 1, reverse summation is performed.
Output
y: output tensor of the identical data type as the input.
Constraints
None.
ONNX Opset Support
Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18
Parent topic: Supported ONNX Operators