Tensorflow is the defacto standard for building advanced neural networks of any kind.
Natively tensorflow is a python library and gives to the user a framework that simplifies operation with tensors.

A tensor is a mathematical object analogous to but more general than a vector, represented by an array of components that are functions of the coordinates of a space.

if you are landing here you probably don't know what a neural network is or why you need a tensor or operations with tensor to build a neural network, but trust me you do.

In this small article will be presented how to fit a simple curve function.

f(x) = x^2 + x + c  

but first a bit of intro about some of the mathematical operations you can do with tensors

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

// declare two tensors
const a = tf.tensor([1, 2, 3]);  
const b = tf.tensor([1, 2, 3]);

// sumElem is the sum of the element in tensor a
const sumElem = a.sum(); // 6

// prodElem is the product of the elements in tensor a
const prodElem = a.prod(); // 6

// dotProd is the dot product of the 2 tensors
const dotProd = a.dot(b) // {0: 14}

// subtTens is the result of Tensor a - Tensor b
const subtTens = a.sub(b) // {0: 0, 1: 0, 2: 0}  

those are some of the basics operations you can do with tf ... of course to go deep into that please follow the API documentation https://js.tensorflow.org/api/latest/

—Read This Next—


Playing with models released for tensorflow js. Posenet is a neural network that allows the estimation of a human pose from an image. For
—You Might Enjoy—

Using tensorflow-models/mobilenet for image recognition

Here is a simple tutorial on how to use the mobilenet model released by google with tensorflow-js. This tutorial requires node v >10 and the