Learn Before
Concept
TensorFlow Autograph
While the imperative programming paradigm is the default in TensorFlow 2, developers can still leverage the performance benefits of symbolic programming through the autograph feature. By applying the @tf.function decorator or explicitly calling the tf.function method on a model (such as a tf.keras.Sequential network), TensorFlow automatically wraps and compiles intuitive imperative code into optimized computational graphs built in the framework's MLIR intermediate representation. This compilation enables rapid execution by heavily optimizing the code at the compiler level.
0
1
Updated 2026-05-18
Tags
D2L
Dive into Deep Learning @ D2L