oneflow.cumprod¶
-
oneflow.
cumprod
(input, dim) → Tensor¶ This operator computes the cumulative product of input elements in the given dimension.
The equation is:
$$ y_{i}=x_{0}*x_{1}*…*x_{i} $$
- Parameters
- Returns
The result tensor with cumprod result.
- Return type
For example:
>>> import oneflow as flow >>> input=flow.tensor([1, 2, 3]) >>> flow.cumprod(input, dim=0) tensor([1, 2, 6], dtype=oneflow.int64)