Demystifying Machine Learning on the Web with Tensorflow.js

Demystifying Machine Learning on the Web with Tensorflow.js

This talk would give a little background into what machine learning is, and an introduction to TensorFlowJS. We would talk briefly about the benefits of machine learning on the browser and show some practical applications. We’d also look into the different methods, and platforms in which it can be used and some demos on how it can be used.

This talk was delivered at the First Open Source Festival in Africa

678a2503a2995aa4815b2992a70d376c?s=128

shedrack akintayo

February 21, 2020
Tweet

Transcript

  1. Demystifying Machine Learning on the Web with Tensorflow.js. Shedrack Akintayo

    RelianceHMO @coder_blvck
  2. Meet Shedrack! - Frontend Engineer.‍ - Loves music and movies.

    - Loves all things javascript. Shedrack Akintayo RelianceHMO @coder_blvck
  3. I’m NOT a Machine Learning Engineer, I just happen to

    know Javascript ‍♂
  4. What is Machine Learning though?

  5. Open Source Festival 2020 Machine Learning Machine Learning is the

    ability of computers to learn by themselves from specific data called datasets without being explicitly programmed.
  6. Open Source Festival 2020 Types of Machine Learning • Supervised

    Learning • Unsupervised Learning • Reinforcement Learning
  7. What is Tensorflow && Tensorflow.js

  8. Photo comes here Tensorflow Tensorflow is an end to end

    open source machine learning platform with a comprehensive and flexible ecosystem of tools, libraries, community support and resources.
  9. Open Source Festival 2020 Tensorflow.js This is an open source

    javascript library built on deeplearn.js(Tensor Flow) used for creating deep learning modules on the browser. With it we can create CNNs, RNNs, etc. directly on the browser and train these modules using the Client’s GPU processing power. Hence, a server GPU is not necessary to train the modules.
  10. Open Source Festival 2020 TensorFlow.js Stack. • TensorFlow.js Core: A

    flexible low-level API, formerly known as deeplearn.js • TensorFlow.js Layers: A high-level API which implements functionality similar to keras • TensorFlow.js Data: A simple API to load and prepare data • TensorFlow.js Converter: tools to import a TensorFlow SavedModel to TensorFlow.js
  11. Overview of Tensorflow.js APIs ⛩

  12. Tensorflow.js is powered by WebGL and it offers high-level layers

    API for defining models, and a low-level API for linear Algebra and automatic differentiation. TensorFlow.js also supports importing TensorFlow SavedModels and Keras Models
  13. None
  14. Platforms that support Tensorflow.js

  15. Open Source Festival 2020 Browser React Native (coming soon) NodeJS

  16. Why Tensorflow.js though? ‍♂

  17. Why Tensorflow.js • You can import an existing, pre-trained model

    for inference. • You can retrain an imported model • You can author models directly in the browser • Write once, run everywhere. • No drivers or installs • Easy to Visualize and interact with data
  18. Important Terms used in TensorFlow.js

  19. Terms • Tensor: This is the central unit of values

    in Tensorflow, it consists of a set of values shaped into an array of one or more dimensions • Models: A set of functions that looks for a relationship between features and labels of data • Epoch: An epoch is the entire processing or iteration by the learning algorithm of the entire data-set. • Learning rate: is a configurable hyperparameter used in the training of neural networks that has a small positive value, often in the range between 0.0 and 1.0.
  20. Pretrained Models in TensorFlow.js

  21. Pretrained Models These are machine learning models that have already

    been written in tensorflow. It is also a saved network that was previously trained on a large dataset, typically on a large-scale image-classification task. They are trained to either deal with data in form of audio, image or text. The have very easy to use APIs, you just have to install or link them from their respective CDNS to use them
  22. Some Pretrained Models available in Tensorflow.js • Object Classification •

    Body Segmentation • Image classification • Speech Command Recognition • Sentence Encoding.
  23. Limitations of Tensorflow.js • Needs a large amount of data(unless

    using pre-trained models) • Training on the web is slow. It takes a lot of time • Bias and Ethics • Speech Command Recognition • Sentence Encoding.
  24. Useful links && Resources

  25. Demo Links for Tensorflow.js • Game Demo by Ashinze Ekene

    • TensorFlow.js website • Pretrained Models • Deep Learning with javascript book • Tensorflow.js Demos
  26. Learning Resources and References • Machine Learning Course from stanford

    • Machine Learning Crash Course by Google • Machine Learning for frontend developers by Charlie Gerard • Machine Learning Magic for your Javascript Application • Machine Learning for frontend developer by Charlie Gerard| JS Heroes 2019 • Machine Learning on the browser with Tensorflow.js by Ashinze Ekene[slides] • A Gentle Introduction to Tensorflow.js
  27. Thank you! Shedrack Akintayo RelianceHMO @coder_blvck

  28. None