# cumulative_sum¶

Graph.cumulative_sum(x, axis=0, *, name=None)

Calculates the cumulative sum of a tensor along a specified dimension.

Parameters
• x (np.ndarray or Tensor) – The tensor whose elements you want to sum. It must have at least one dimension.

• axis (int, optional) – The dimension along which you want to sum the tensor. Defaults to 0.

• name (str, optional) – The name of the node.

Returns

The cumulative sum of x along dimension axis.

Return type

Tensor