November 2019
Intermediate to advanced
296 pages
7h 52m
English
As we mentioned previously, the WebGL backend compiles the shader program to execute it. The compilation process runs in a lazy manner. It doesn't run at the time when the operation graph is defined; instead, it runs when the computation is requested (for example, with data or dataSync) because compiling the shader program is not a lightweight operation. To make full use of the shader resource, TensorFlow.js has a cache for the precompiled shader program. This is shown in the following diagram:

This technique can contribute to improving the performance of the application. Before running training or inference, ...
Read now
Unlock full access