# tf.data.experimental.bytes_produced_stats

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/data/experimental/bytes_produced_stats) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/data/experimental/ops/stats_ops.py#L51-L71) |

Records the number of bytes produced by each element of the input dataset.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.data.experimental.bytes_produced_stats`](https://www.tensorflow.org/api_docs/python/tf/data/experimental/bytes_produced_stats), \`tf.compat.v2.data.experimental.bytes_produced_stats\`

<br />

    tf.data.experimental.bytes_produced_stats(
        tag
    )

To consume the statistics, associate a `StatsAggregator` with the output
dataset.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tag` | String. All statistics recorded by the returned transformation will be associated with the given `tag`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Dataset` transformation function, which can be passed to [`tf.data.Dataset.apply`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/data/Dataset#apply). ||

<br />