TensorFlow

See the Quick Start Guide on how to install and configure the profiler.

To profile TensorFlow, add the following code around a code step, e.g. training batch or a prediction. Only some steps will be profiled; the profiler decides which steps to profile for optimal statistics and low overhead. See profiling API reference for full documentation.

Profile TensorFlow using with context manager:

from graphsignal.profilers.tensorflow import profile_step

with profile_step():
    # training batch, prediction, etc.

Profile using stop:

from graphsignal.profilers.tensorflow import profile_step

step = profile_step()
    # training batch, prediction, etc.
step.stop()