Running ML models on the browser became so much more easier!
We have seen the awesome capacity of TensorFlow and how it makes the process of programming neural network architectures so much more simpler. An increasing number of startups are using TensorFlow in their open-source projects.
Best of TF – now on your browser
On Friday, 30 March 2018, the TensorFlow team announced the arrival of the much-awaited web version of the famous ML framework, TensorFlow.js.
Now, developers can build lightweight models and directly run them on the browser without any hassle. The code examples and documentation provided are easy to understand and fortunately, they follow the same generic programming convention of the Python framework in terms of syntax and applicability.
To get started with projects with TF.js, you can check out their site here.
Creating Neural Networks
Let’s take a look at how one can create a simple feedforward NN using TF.js:
In comparison, here is the implementation of the same neural network using the Python framework:
The lack of proper training datasets does have an effect on the accuracy of the above network demo (We all know that’s not the right answer). Nonetheless, the JS library has the same performance metrics as its Python counterpart, assuring you the same quality as your Python projects that use TensorFlow, Keras or tflearn.
An honest review (of sorts)
Learning about TensorFlow has been a new experience on its own! The ease of implementing Machine Learning algorithms and deploying them has revolutionised the industry.
The code is simple to write and doesn’t contain too much technical jargon, making it ideal for beginners. Another exciting development to look forward to in the web ML space is the release of Keras.js. I’d like to get my hands on that!
Generally, if you are used to tflearn, TensorFlow.js should be easy to apply into your web projects. The code is lightweight and the training is fast. There doesn’t seem to be any problems in reading the JS documentation and implementing the code for the network.
In a nutshell
Original article by Rishabh Anand