moving_average

dragon.math.moving_average(
  inputs,
  decay,
  **kwargs
)[source]

Compute the moving average of input to output.

\[y = (1 - decay) * x + decay * y \]
Parameters:
  • inputs (Sequence[dragon.Tensor]) – The x.
  • decay (float, required) – The decay factor.
Returns:

Sequence[dragon.Tensor] – The y.