tf.profiler.experimental.start
Start profiling TensorFlow performance.
tf.profiler.experimental.start( logdir, options=None )
Args | |
---|---|
logdir | Profiling results log directory. |
options | ProfilerOptions namedtuple to specify miscellaneous profiler options. See example usage below. |
Raises | |
---|---|
AlreadyExistsError | If a profiling session is already running. |
Example usage:
options = tf.profiler.experimental.ProfilerOptions(host_tracer_level = 3, python_tracer_level = 1, device_tracer_level = 1) tf.profiler.experimental.start('logdir_path', options = options) # Training code here tf.profiler.experimental.stop()
To view the profiling results, launch TensorBoard and point it to logdir
. 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.4/api_docs/python/tf/profiler/experimental/start