TensorFlow.js brings the power of the world's most popular ML library to the browser, allowing for seamless integration of AI into web apps.
1The Math of Tensors
Tensors are the language of AI. Whether it's an image (3D tensor), a sentence (2D tensor), or a single number (0D tensor), everything in TFJS is represented as a tensor. This allows the library to perform massive parallel calculations using the user's GPU, making complex AI tasks possible in the browser.
2Memory is Finite
Web browsers have strict memory limits. Tensors are stored in GPU memory, which isn't managed by the standard JavaScript Garbage Collector. Learning to use tf.tidy() and tensor.dispose() is the difference between a professional app and one that crashes the user's browser in minutes.
