In this chapter, we looked at several techniques we can use to improve the performance and stability of machine learning applications that are written in TensorFlow.js. Since TensorFlow.js is a framework that accelerates various kinds of runtime systems, such as WebGL, understanding its internal structure and implementation is the key to creating a performant application.
It is also important to profile our application's execution. Without complete knowledge of bottleneck and performance characteristics, we may end up with misplaced optimization. We can make use of the profiler that TensorFlow.js implements, as well as the Chrome profiler, to do this since the machine learning application in TensorFlow.js is just a web application. tf-vis shows us the other side of the application. The metrics that are obtained by tf-vis are more application-specific so that people...