API 相关说明
Computes the cumulative sum of elements along given axis.
inp (Tensor) – input tensor.
Tensor
axis (int) – axis along which cumsum is performed.
int
实际案例
from megengine import tensor import megengine.functional as F x = tensor([[1, 2, 3], [4, 5, 6]], "int32") y = F.cumsum(x, 1) print(y.numpy())
Outputs:
[[ 1 3 6] [ 4 9 15]]
上一页
megengine.functional.std
下一页
megengine.functional.dot