# tf.profiler.experimental.stop

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/profiler/profiler_v2.py#L129-L153) |

Stops the current profiling session.

    tf.profiler.experimental.stop(
        save=True
    )

The profiler session will be stopped and profile results can be saved.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `save` | An optional variable to save the results to TensorBoard. Default True. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `UnavailableError` | If there is no active profiling session. |

<br />