axpby

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

Compute the element-wise addition from input to output.

\[\text{out} = \alpha * \text{input} + \beta * \text{out} \]

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

Parameters:
  • inputs (dragon.Tensor) – The input tensor.
  • outputs (dragon.Tensor, optional) – The output tensor.
  • alpha (number, optional, default=1.) – The value to \(\alpha\).
  • beta (number, optional, default=1.) – The value to \(\beta\).
Returns:

dragon.Tensor – The output tensor.