function cumsum_(x, axis = 0, exclusive = false, reverse = false) {
    const $x = (0, _tensorUtilEnv.convertToTensor)(x, "x", "cumsum");
    const inputs = {
        x: $x
    };
    const attrs = {
        axis,
        exclusive,
        reverse
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.Cumsum), inputs, attrs);
}
Computes the cumulative sum of a `tf.Tensor` along `axis`.

```js
const x = tf.tensor([1, 2, 3, 4]);
x.cumsum().print();
```
```js
const x = tf.tensor([[1, 2], [3, 4]]);
x.cumsum().print();
```

@param x The input tensor to be summed.
@param axis The axis along which to sum. Optional. Defaults to 0.
@param exclusive Whether to perform exclusive cumulative sum. Optional.
    Defaults to false. If set to true then the sum of each tensor entry
    does not include its own value, but only the values previous to it
    along the specified axis.
@param reverse Whether to sum in the opposite direction. Optional.
    Defaults to false.

@doc {heading: 'Operations', subheading: 'Scan'}