Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Demystifying Machine Learning on the Web with T...

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

shedrack akintayo

February 21, 2020
Tweet

More Decks by shedrack akintayo

Other Decks in Programming

Transcript

  1. Meet Shedrack! - Frontend Engineer.‍ - Loves music and movies.

    - Loves all things javascript. Shedrack Akintayo RelianceHMO @coder_blvck
  2. 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.
  3. Open Source Festival 2020 Types of Machine Learning • Supervised

    Learning • Unsupervised Learning • Reinforcement Learning
  4. 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.
  5. 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.
  6. 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
  7. 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
  8. 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
  9. 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.
  10. 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
  11. Some Pretrained Models available in Tensorflow.js • Object Classification •

    Body Segmentation • Image classification • Speech Command Recognition • Sentence Encoding.
  12. 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.
  13. Demo Links for Tensorflow.js • Game Demo by Ashinze Ekene

    • TensorFlow.js website • Pretrained Models • Deep Learning with javascript book • Tensorflow.js Demos
  14. 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