add_n

dragon.vm.tensorflow.math.add_n(
  inputs,
  name=None
)[source]

Compute the element-wise sum on a sequence of inputs.

\[\text{out} = \sum(\text{input}_{i}) \]

Examples:

x = tf.constant([1, 2, 3])
print(tf.math.add_n([x, x, x]))
Parameters:
  • inputs (Sequence[dragon.Tensor]) – The input tensors.
  • name (str, optional) – The operation name.
Returns:

dragon.Tensor – The output tensor.