Tensorflow For the Web : Converting Python Machine Learning Models to Javascript using TFJS Converter

Shivay Lamba (~shivaylamba)


Conventional methods of uploading machine learning models for web applications can be a daunting task for web developers who specialize in Javascript. Learning Python, deployment of models, cross referencing machine learning models made in Python using APIs in Nodejs backend environment are some of the additional requirements for a web developer with little or no experience in Python or Machine Learning. The developers might require powerful CPUs/GPUs to be used for training of the models. This is where Tensorflow.JS ( TFJS ) comes into the picture. It allows standard machine learning libraries and models to be used directly with Javascript. It runs the models on the Browser ( client side ), or on the backend with Nodejs. And it makes it really easy for the Javascript developers to integrate machine learning models without much knowledge behind how these models work. But to give more flexibility TensorflowJS Converter allows Python Machine learning Models to be converted to Javascript nodejs based models.

I will be talking about TFJS Converter, the inner architecture and functioning of it. I will showcase certain code samples for TFJS Converter and will also discuss on how to contribute to open sourced TFJS and TFJS Converter.

OutLine for this Talk ( 30 Minutes ) :

  • Brief intro about TensorflowJS. ( 5 minutes )
  • Brief discussion on standard ways of deploying python Machine learning models with Flask and Django in a web application ( 2 minutes )
  • Introduction about TensorflowJS Converter ( 7 minutes )
  • Architecture of TFJS Converter ( 2 minutes )
  • Practical demo of steps to be followed for using TensorflowJS Converter ( 10 minutes )
  • Few demo Python ML models converted to Nodejs Backend using TFJS Converter and ending notes ( 4 minutes )


Basic Understanding of Tensorflow, Javascript, Python and Machine Learning

Video URL:


Content URLs:

Presentation : https://docs.google.com/presentation/d/1lPhis21uR_oTL-U5i_KmQX_oz-SWlkXnRHy_49aPafs/edit?usp=sharing

Talk given at Belpy 2021 : https://www.youtube.com/watch?v=yh9KhbU7l_Y

Speaker Info:

Shivay Lamba is a software developer specializing in DevOps, Machine Learning and Full Stack Development.

He is an Open Source Enthusiast and has been part of various programs like Google Code In and Google Summer of Code as a Mentor and is currently a MLH Fellow. He has also interned at organizations like EY, Genpact. He is actively involved in community work as well. He is a TensorflowJS SIG member, Mentor in OpenMined and CNCF Service Mesh Community, SODA Foundation and has given talks at various conferences like Github Satellite, Voice Global, Fossasia Tech Summit, TensorflowJS Show & Tell.

Speaker Links:

Find me at : - Github : https://github.com/shivaylamba - Linkedin : https://linkedin.com/in/shivaylamba - Twitter : https://twitter.com/howdevelop

Previous Talks : - Github Satellite : https://www.youtube.com/watch?v=RmcMORdFMQA - Node Congress : https://www.youtube.com/watch?v=Riqbl6zFdak - FOSSASIA Tech Summit : https://www.youtube.com/watch?v=C1_eRbt_Sz0 - Belpy 2021 : https://www.youtube.com/watch?v=yh9KhbU7l_Y - Voice Global Summit : https://www.modev.com/en/workshop-blog/shivay-lamba

Section: Web development
Type: Talks
Target Audience: Beginner
Last Updated: