tf.profiler.experimental.start  |  TensorFlow v2.16.1 (original) (raw)

tf.profiler.experimental.start

Stay organized with collections Save and categorize content based on your preferences.

Start profiling TensorFlow performance.

tf.profiler.experimental.start(
    logdir, options=None
)

Used in the notebooks

Used in the guide Used in the tutorials
Introduction to modules, layers, and models Research tools
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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2024-04-26 UTC.