|View source on GitHub|
Enables debug mode for tf.data.
Compat aliases for migration
See Migration guide for more details.
import tensorflow as tf tf.data.experimental.enable_debug_mode() ds = ... # input pipeline definition
The effect of debug mode is two-fold:
1) Any transformations that would introduce asynchrony, parallelism, or non-determinism to the input pipeline execution will be forced to execute synchronously, sequentially, and deterministically.
2) Any user-defined functions passed into tf.data transformations such as
map will be wrapped in
tf.py_function so that their body is executed
"eagerly" as a Python function as opposed to a traced TensorFlow graph, which
is the default behavior. Note that even when debug mode is enabled, the
user-defined function is still traced to infer the shape and type of its
outputs; as a consequence, any
||When invoked from graph mode.|