# tf.contrib.framework.reduce_sum_n

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/framework/tensor_util.py#L56-L79) |

Reduce tensors to a scalar sum.

    tf.contrib.framework.reduce_sum_n(
        tensors, name=None
    )

This reduces each tensor in `tensors` to a scalar via [`tf.reduce_sum`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/math/reduce_sum), then
adds them via [`tf.add_n`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/math/add_n).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensors` | List of tensors, all of the same numeric type. |
| `name` | Tensor name, and scope for all other ops. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Total loss tensor, or None if no losses have been configured. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if `losses` is missing or empty. |

<br />