Understanding Machine Learning Development with TensorFlow JS

Posted by OodlesAI on March 20th, 2020

AI and ML are two things that are going to be the future of our day to day life. As for now, it is used in some of our daily activities like in our smartphones, computers/laptop, and browsers.TensorFlow is an open-source software library for high-performance numerical computation, for ML and also used for the neural network training. However, the software library came with a difficult installation process for desktops. To make it frictionless, developers can now deploy machine learning development services with "TensorFlow.js". 


 

TensorFlow.js is also an open-source WebGL-accelerated JavaScript library for machine intelligence. It brings highly performant machine learning building blocks inside the browser to be played, allowing you to train neural networks in a browser or run pre-trained models in inference mode. TensorFlow.js is not only facilitating machine learning development but also the integration of diverse AI development services across business systems. 

TensorFlow.js provides both low-level building blocks for machine learning and high-level, Keras-inspired API for constructing neural networks.

We can use TensorFlow.js to retrain pre-existing machine learning models with the data which is available at the client-side in the browser. E.g. We can use image data from the webcam.

Main building blocks in TensorFlow

Tensors: It is the central unit of data in TensorFlow. A tensor contains a set of numeric values that can be of any shape (dimensions).

const t1 = tf.tensor([1,2,3,4,2,4,6,8]), [2,4]);

Operations: Using TensorFlow operations we can manipulate data of a tensor. Because of the rigidness of tensor operations are always returning a new tensor with the resulting values.

const t3 = tf.tensor2d([1,2], [3, 4]);// tensor2d 2d is dimension

const t3_squared = t3.square();

Modules / Layers: Models and Layers are the two important building blocks in deep learning. Each model has one or more layers. For better understanding, we can say layers are used to build up neural networks (models) that can be trained with data and then used to predict further values based on the trained information.

There are some crazy things which we can do with TensorFlow.js like.

Real-time Human Position Estimation in the browser.

We can train our model using a webcam in our browser.     

We can use concepts like Tensors, Layers, Optimizers and Loss Functions.

Now the best part how to install it in your browser.

it's simple as it is a js file you just need to import it that's all you need to do.

npm install @tensorflow/tfjs

import * as tf from '@tensorflow/tfjs';

or 


OodlesAI

About the Author

OodlesAI
Joined: June 21st, 2019
Articles Posted: 99

CryptoBits - Welcome to the World of Crypto!
Explore the world of Crypto and learn to invest and earn, play games and become a part of the decentralized world today!
Passive Income - Effortlessly | Honeygain
Honeygain is the first-ever app that allows users to make money online by sharing their internet connection.
Earn Crypto with the COIN App!
Earn crypto on your Android or iOS Smartphone! Signup through this link and receive 1,000 free coins!
KuCoin | Cryptocurrency Exchange | Buy & Sell Bitcoin, Ethereum, and more
KuCoin is the most advanced and secure cryptocurrency exchange to buy and sell Bitcoin, Ethereum, Litecoin, TRON, USDT, NEO, XRP, KCS, and more. KuCoin also provide Excellent Support, Maker & Taker Transaction Fees, Open API
Earn Crypto with Stakecube
StakeCube is the predominant crypto ecosystem originally launched in June 2018 as PoS Pool and has since grown to service over 50,000 Users and supporting 55+ different crypto assets with unique features across 10+ apps, like an integrated Exchange, maste
CryptoTab Browser - Easy way for Bitcoin Mining | CryptoTab Browser
CryptoTab Browser is the world's first web browser with built-in mining features. Familiar Chrome user interface is perfectly combined with extremely fast mining speed. Mine and browse at the same time!