tf.profiler.experimental.start

Starts profiling.

Args
logdir A log directory read by TensorBoard to export the profile results.
options namedtuple of ProfilerOptions for miscellaneous profiler options.
Raises
AlreadyExistsError If another profiling session is running.

Example usage:

tf.profiler.experimental.start(
    'logdir_path', tf.profiler.ProfilerOptions(host_tracer_level=2))
# do your training here.
tf.profiler.experimental.stop()

Launch TensorBoard and point it to the same logdir you provided to this API. $ tensorboard --logdir=logdir_path Open your browser and go to localhost:6006/#profile to view profiling results.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/profiler/experimental/start