New Stuff in TensorFlow

DevFest Cebu


Martin Andrews

martin @ reddragon.ai

27 Oct 2018

About Me

  • Machine Intelligence / Startups / Finance
    • Moved from NYC to Singapore in Sep-2013
  • 2014 = 'fun' :
    • Machine Learning, Deep Learning, NLP
    • Robots, drones
  • Since 2015 = 'serious' :: NLP + deep learning
    • & GDE ML; TF&DL co-organiser
    • & Papers...
    • & Dev Course...

About Red Dragon AI

  • Google Partner : Deep Learning Consulting & Prototyping
  • SGInnovate/Govt : Education / Training
  • Products :
    • Conversational Computing
    • Natural Voice Generation - multiple languages
    • Knowledgebase interaction & reasoning

Outline

  • Other new stuff...
  • Javascript and Deep Learning
  • Javascript and TensorFlow

Google IO

Keynote end

End of the Duplex Announcement

Google IO

In the crowd

Spotted in the audience

ENHANCE!

ENHANCE!

Other Cool Stuff

  • TensorFlow lite ~ small-TF
  • ML-Kit ~ Firebase machine learning
  • TFX ~ TensorFlow framework...
    • ... for training and serving ML models
  • Swift ~ "Coming soon" language

Some visibility...

TensorFlow Ecosystem

Who knew? Google has been updating their site..

Javascript Deep Learning

  • Some history...
  • Javascript development is more of a bazaar...

Convnet.js

Convnet.js

(actual contributor in 2014)

TensorFlow Playground

TensorFlow Playground

Written 'ad-hoc'

Meta-Learning Demo

OpenAI Reptile 3-boxes demo

Uses jsNet

Distill

Distill CNN interpretation

Nice CNN interpretability write-up

Javascript TensorFlow

TensorFlow.js

Google IO Announcement

Actual announcement (and demos)

Code example

( Boring )

Code example

Exciting!

Use existing models

Import from Keras !

# Python
import tensorflowjs as tfjs
def train(...):
    model = keras.models.Sequential()   # for example
    #...
    model.fit(...)
    tfjs.converters.save_keras_model(model, tfjs_target_dir)  
    
# JS
import * as tf from '@tensorflow/tfjs';
const model = await tf.loadModel('https://foo.bar/tfjs_artifacts/model.json');
const example = tf.fromPixels(webcamElement);  // for example
const prediction = model.predict(example);

See the tutorial

Browser Benchmark

Browser performance

Not same as native, but not bad

Node.js Deep Learning

  • Javascript isn't only for the browser
  • Node.js support announced at Google IO
  • Still "Experimental" ...

Server Stack

Server TF node stack

Server Benchmark

Server performance

Already on a par with Python

Wrap-up

  • TensorFlow.js now part of ecosystem
  • Welcoming JS devs = Awesome
  • Democratisation may be messy
GitHub - mdda

* Please add a star... *

Deep Learning
MeetUp Group

BONUS !

  • Now FREE from Google via Kaggle (aka Colab) :
    • 12hrs-at-a-time of K-80 GPU
    • 12hrs-at-a-time of Gen-2 TPU
    • Google Colab Tips and Tricks

( Don't use for Mining )

Deep Learning : Jump-Start Workshop

  • Dates + Cost : End-June, S$600
    • Full day (week-end)
    • Play with real models
    • Get inspired!
    • Pick-a-Project to do at home
    • 1-on-1 support online
    • Regroup on subsequent week-nights

Deep Learning
Developer Course

  • Plan : Advanced modules in September/October
  • JumpStart module is ~ prerequisite
  • Each 'module' will include :
    • Instruction
    • Individual Projects
    • Support by SG govt (planned)
  • Location : SGInnovate
  • Status : TBA

- QUESTIONS -


martin @
RedDragon.AI


My blog : http://blog.mdda.net/

GitHub : mdda