mori-c / tensorflow-js

Rangle.io ML Introductory Practice Using Tensorflow.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tensorflow

ML Introductory Practice Using Tensorflow


Overview

  • tf.js is 3-5x slower than GPU tf

Workflow

  1. define loss() or error()
    • of predicted output to actual output
    • checks parameter space, to min
  2. create linear regression
  3. apply stochastic descent
  4. loss() and confusion matrices

Setup

Obs Instruction Tasks
1. Clone Ryan Marchildon's repo $ git clone git@github.com:RyanMarchildon/tfjs-torontoai-lecture.git
2-a. Webserver - JS $ npm install local-web-server -g
2-b. Webserver - Py $ python3 -m http.server

Getting Started

  1. Fundamental

    • tf.js /index.html

      <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.0/dist/tf.min.js"></script>
      
  2. Tensors

    • multi-dimensional array vector
  3. CNN

    • tfjs-vis
  4. Memory management

  5. MNIST data with tf.js

    • loss( ) and confusion matrices

    • local host this model due to cross origin reference sharing

    • need to add script call below in html file

      <!-- Import TensorFlow.js -->
      <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.0/dist/tf.min.js"></script>
      <!-- Import tfjs-vis -->
      <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis@1.0.2/dist/tfjs-vis.umd.min.js"></script>
      
      <!-- Import the data file -->
      <script src="data.js" type="module"></script>
      
      <!-- Import the main script file -->
      <script src="main.js" type="module"></script>
      

Futher Resources

Readings

NIP's Visual Reasoning by Progressive Module Networks - Seung Wook Kim

Audio Prototype

OpenAi MuseNet








Rangle.io's take on building AI applications with tensorflow.js

screencapture article ai rangle.io tensorflow.js

About

Rangle.io ML Introductory Practice Using Tensorflow.js

License:MIT License


Languages

Language:HTML 85.1%Language:JavaScript 13.0%Language:CSS 1.9%