# tf.contrib.layers.summarize_tensor

<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/layers/python/layers/summaries.py#L107-L132) |

Summarize a tensor using a suitable summary type.

    tf.contrib.layers.summarize_tensor(
        tensor, tag=None
    )

This function adds a summary op for `tensor`. The type of summary depends on
the shape of `tensor`. For scalars, a `scalar_summary` is created, for all
other tensors, `histogram_summary` is used.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensor` | The tensor to summarize |
| `tag` | The tag to use, if None then use tensor's op's name. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The summary op created or None for string tensors. ||

<br />