tf.add_n(inputs, name=None)

tf.add_n(inputs, name=None)

See the guide: Math > Basic Math Functions

Adds all input tensors element-wise.


  • inputs: A list of Tensor objects, each with same shape and type.
  • name: A name for the operation (optional).


A Tensor of same shape and type as the elements of inputs.


  • ValueError: If inputs don't all have same shape and dtype or the shape cannot be inferred.

Defined in tensorflow/python/ops/