# tf.compat.v1.summary.merge_all

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/summary/summary.py#L376-L406) |

Merges all summaries collected in the default graph.

    tf.compat.v1.summary.merge_all(
        key=tf.GraphKeys.SUMMARIES, scope=None, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `key` | `GraphKey` used to collect the summaries. Defaults to `GraphKeys.SUMMARIES`. |
| `scope` | Optional scope used to filter the summary ops, using `re.match` |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| If no summaries were collected, returns None. Otherwise returns a scalar `Tensor` of type `string` containing the serialized `Summary` protocol buffer resulting from the merging. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `RuntimeError` | If called with eager execution enabled. |

<br />

#### Eager Compatibility

Not compatible with eager execution. To write TensorBoard
summaries under eager execution, use `tf.contrib.summary` instead.