accumulate

dragon.math.accumulate(
  inputs,
  outputs=None,
  alpha=1.0,
  beta=1.0,
  **kwargs
)[source]

Compute the element-wise accumulation from input to output.

\[y = \alpha x + \beta y \]

If outputs is not provided, zeros will be used instead.

Parameters:
  • inputs (Sequence[dragon.Tensor]) – The tensor \(x\).
  • outputs (Sequence[dragon.Tensor], optional) – The tensor \(y\).
  • alpha (number, optional, default=1.) – The value of \(\alpha\).
  • beta (number, optional, default=1.) – The value of \(\beta\).
Returns:

Sequence[dragon.Tensor] – The tensor \(y\).