Acceleration by Hybridization
By converting an imperatively defined neural network into a compiled, symbolic representation, developers can significantly accelerate its execution time. This process, known as hybridization, allows deep learning frameworks to apply global optimizations to the computational graph—optimizations that are unavailable during standard, step-by-step eager execution. In practice, this performance improvement can be demonstrated by benchmarking the execution time of models before and after applying framework-specific compilation tools, such as torch.jit.script for nn.Sequential models in PyTorch, the hybridize method for HybridSequential models in MXNet, or the tf.function method for tf.keras.Sequential models in TensorFlow.
0
1
Tags
D2L
Dive into Deep Learning @ D2L