SlideShare a Scribd company logo
Google confidential | Do not distribute
Machine Learning Basics
for Web Application Developers
Etsuji Nakai
Cloud Solutions Architect at Google
2016/08/19 ver1.2
$ who am i
▪Etsuji Nakai
Cloud Solutions Architect at Google
Twitter @enakai00
Machine Learning Basics
Linear Binary Classifier
▪ Build a model to classify two types of
data with a straight line.
●
The model will predict the probability of
being in the positive class for new data.
●
It’s like predicting if the patient is
infected with a specific virus based on the
preliminary check result.
▪ Observe how the model is trained on
“Neural Network Playground”
●
http://goo.gl/A2G4Hv
x : Positive
o : Negative
Logistic Regression
▪ The straight line can be represented
as below, which can be translated to a
probability through the logistic
function σ.
▪ “To train the model” is to adjust the
parameters so that the
model fits in the training dataset.
Logistic function σ
Probability of
being positive
The value of f increases
in this direction
How to measure “fitness” of the model
▪ You define the “loss function” which indicates the non-fitness of the model. Then
ML algorithms adjust parameters to minimize the loss function.
●
In logistic regression, you adjust the parameters to maximize the probability of giving a
perfect prediction for the training dataset.
●
For example, suppose that n-th data is given as and its correct label is
(1=x, 0=o). Then the probability that the model gives the correct prediction for this
data is:
●
Hence the probability of giving correct predictions for all data is:
●
By defining the loss function E as below, you cal tell ML algorithms to minimize it.
Graphical Understanding of Linear Classifier
▪ Drawing 3-dimensional graph of ,
you can see that the “tilted flat plane”
divides the plane into two classes.
Linear Multiclass Classifier (Hardmax)
▪ How can you divide the plane into
three classes (instead of two)?
▪ You can define three liner functions and
classify the point based on “which of them
has the maximum value at that point.”
●
It is equivalent to dividing with the three
tilted flat planes.
Linear Multiclass Classifier (Softmax)
▪ You can define the probability that
belongs to the i-th class as below:
▪ This translates the magnitude of
into the probability satisfying the following
conditions.
One dimensional example of
the softmax translation.
Image Classification
with Neural Network
Classifying Images with Softmax function
▪ For example, a gray scale image with 28x28
pixels can be represented as a 784 dimensional
vector. (i.e a collection of 784 float numbers.)
●
In other word, it corresponds to a single point in a
784 dimensional space!
▪ When you spread a bunch of images into this 784
dimensional space, similar images may come
together to form clusters of images.
●
If this is a correct assumption, you can classify the
images by dividing the 784 dimensional space with
the softmax function.
Let’s try with TensorFlow Correct Incorrect
http://goo.gl/rGqjYh
▪ You can see the code and its result (92% accuracy).
* Comments are in Japanese.
Improving Accuracy using CNN
Raw
Image
Softmax Function
Pooling
Layer
Convolution
Filter
・・・
Convolution
Filter
・・・
・・・
Dropout Layer
Fully-connected Layer
Pooling
Layer
Convolution
Filter
・・・
Convolution
Filter
Pooling
Layer
・・・
Pooling
Layer
▪ Instead of providing the raw image data into the softmax
function, you can extract “features” of images through
convolutional filters and pooling layers.
Let’s try with TensorFlow
http://goo.gl/UHsVmI
http://goo.gl/VE2ISf
▪ You can see the code and its result (99.2% accuracy).
A new Book for TensorFlow and CNN!
https://www.amazon.co.jp/dp/4839960887/
* This is available only in Japanese now. Please ask publishers in your region to make a translation ;)
Client Applications using ML models
API services for pre-trained models
http://goo.gl/dh6cwB
▪ See an example.
Send Image
Client
Cloud Service
Reply the location of faces
and their emotions.
Smile Detection from Webcam Images
▪ The browser code sends webcam images to Google Vision API
and notify when you’re smiling ;)
http://goo.gl/9EM8tr
Cucumber Classification with TensorFlow
▪ A cucumber farmer built an original “Cucumber
sorter” using TensorFlow.
▪ Client application running on RasPi works with
the Aruduino Micro to control the belt conveyor
and the sorting devices.
https://cloud.google.com/blog/big-data/2016/08/how-a-japanese-cucumber-farmer-is-using-deep-learning-and-tensorflow
Other Possible Architectures
▪ Providing additional data to a pre-trained model to fine-tune it for your
specific purpose.
●
Technically referred as “Transfer Learning.”
▪ Running trained model on the client.
●
You need a lot of computing resource to train the model. But you can use the
trained model directly on the client.
▪ Realtime model training on the client?
●
Considering the increasing computing resource available on the client, you may be
able to train the model dynamically on the client using realtime data (such as
webcam images) available on the client.
Similarity between model training and application development
Revised Model
Additional
Data
Revised Model
Final Model
Applications
API
access
Training
Production environment
Test
Test
Upgrade models
Training
Fix and retry
success
fail
Existing
Models
Version control
of models
Model tunings
Preprocess and feed
Deploy new
models
▪ This resembles the software development model (CI/CD).
▪ There will be some de-fact tools to build this framework
in near future (maybe.)
Existing
Models
Existing
Models
Thank you!
Ad

Recommended

PDF
Introducton to Convolutional Nerural Network with TensorFlow
Etsuji Nakai
 
PDF
Safety Verification of Deep Neural Networks_.pdf
larbaoui
 
PDF
A calculus of mobile Real-Time processes
larbaoui
 
ODP
Hubba Deep Learning
Ivan Goloskokovic
 
ODP
Deep Learning meetup
Ivan Goloskokovic
 
PDF
How Powerful are Graph Networks?
IAMAl
 
PDF
Optimization (DLAI D4L1 2017 UPC Deep Learning for Artificial Intelligence)
Universitat Politècnica de Catalunya
 
PPTX
Machine learning applications in aerospace domain
홍배 김
 
PDF
Overview of TensorFlow For Natural Language Processing
ananth
 
PDF
Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)
Universitat Politècnica de Catalunya
 
PDF
Dive into Deep Learning
Darío Garigliotti
 
PPTX
Control System Homework Help
Matlab Assignment Experts
 
PPTX
Graph Neural Network - Introduction
Jungwon Kim
 
PDF
Joint unsupervised learning of deep representations and image clusters
Universitat Politècnica de Catalunya
 
PDF
딥러닝 논문읽기 모임 - 송헌 Deep sets 슬라이드
taeseon ryu
 
PPTX
Machine Learning - Introduction to Tensorflow
Andrew Ferlitsch
 
PDF
Matlab plotting
pink1710
 
PPTX
Digit recognizer by convolutional neural network
Ding Li
 
PDF
Neural networks with python
Simone Piunno
 
PDF
How does unlabeled data improve generalization in self training
taeseon ryu
 
PPTX
Deep learning
Jin Sakuma
 
PPTX
Graph Plots in Matlab
DataminingTools Inc
 
PPTX
Compiler Design
sweetysweety8
 
PDF
I Don't Want to Be a Dummy! Encoding Predictors for Trees
Work-Bench
 
PDF
Broom: Converting Statistical Models to Tidy Data Frames
Work-Bench
 
PDF
Data flow vs. procedural programming: How to put your algorithms into Flink
Mikio L. Braun
 
PPTX
2.5D Clip-Surfaces for Technical Visualization
Matthias Trapp
 
PPTX
Rendering of Complex 3D Treemaps (GRAPP 2013)
Matthias Trapp
 
PDF
Your first TensorFlow programming with Jupyter
Etsuji Nakai
 
PDF
TensorFlowによるニューラルネットワーク入門
Etsuji Nakai
 

More Related Content

What's hot (20)

PDF
Overview of TensorFlow For Natural Language Processing
ananth
 
PDF
Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)
Universitat Politècnica de Catalunya
 
PDF
Dive into Deep Learning
Darío Garigliotti
 
PPTX
Control System Homework Help
Matlab Assignment Experts
 
PPTX
Graph Neural Network - Introduction
Jungwon Kim
 
PDF
Joint unsupervised learning of deep representations and image clusters
Universitat Politècnica de Catalunya
 
PDF
딥러닝 논문읽기 모임 - 송헌 Deep sets 슬라이드
taeseon ryu
 
PPTX
Machine Learning - Introduction to Tensorflow
Andrew Ferlitsch
 
PDF
Matlab plotting
pink1710
 
PPTX
Digit recognizer by convolutional neural network
Ding Li
 
PDF
Neural networks with python
Simone Piunno
 
PDF
How does unlabeled data improve generalization in self training
taeseon ryu
 
PPTX
Deep learning
Jin Sakuma
 
PPTX
Graph Plots in Matlab
DataminingTools Inc
 
PPTX
Compiler Design
sweetysweety8
 
PDF
I Don't Want to Be a Dummy! Encoding Predictors for Trees
Work-Bench
 
PDF
Broom: Converting Statistical Models to Tidy Data Frames
Work-Bench
 
PDF
Data flow vs. procedural programming: How to put your algorithms into Flink
Mikio L. Braun
 
PPTX
2.5D Clip-Surfaces for Technical Visualization
Matthias Trapp
 
PPTX
Rendering of Complex 3D Treemaps (GRAPP 2013)
Matthias Trapp
 
Overview of TensorFlow For Natural Language Processing
ananth
 
Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)
Universitat Politècnica de Catalunya
 
Dive into Deep Learning
Darío Garigliotti
 
Control System Homework Help
Matlab Assignment Experts
 
Graph Neural Network - Introduction
Jungwon Kim
 
Joint unsupervised learning of deep representations and image clusters
Universitat Politècnica de Catalunya
 
딥러닝 논문읽기 모임 - 송헌 Deep sets 슬라이드
taeseon ryu
 
Machine Learning - Introduction to Tensorflow
Andrew Ferlitsch
 
Matlab plotting
pink1710
 
Digit recognizer by convolutional neural network
Ding Li
 
Neural networks with python
Simone Piunno
 
How does unlabeled data improve generalization in self training
taeseon ryu
 
Deep learning
Jin Sakuma
 
Graph Plots in Matlab
DataminingTools Inc
 
Compiler Design
sweetysweety8
 
I Don't Want to Be a Dummy! Encoding Predictors for Trees
Work-Bench
 
Broom: Converting Statistical Models to Tidy Data Frames
Work-Bench
 
Data flow vs. procedural programming: How to put your algorithms into Flink
Mikio L. Braun
 
2.5D Clip-Surfaces for Technical Visualization
Matthias Trapp
 
Rendering of Complex 3D Treemaps (GRAPP 2013)
Matthias Trapp
 

Viewers also liked (20)

PDF
Your first TensorFlow programming with Jupyter
Etsuji Nakai
 
PDF
TensorFlowによるニューラルネットワーク入門
Etsuji Nakai
 
PDF
TensorFlowプログラミングと分類アルゴリズムの基礎
Etsuji Nakai
 
PDF
A Brief History of My English Learning
Etsuji Nakai
 
PDF
Spannerに関する技術メモ
Etsuji Nakai
 
PDF
Using Kubernetes on Google Container Engine
Etsuji Nakai
 
PDF
Caffeの特徴と最近の動向 -CNN、そしてRNNへ-
Yasuyuki Sugai
 
PDF
Googleのインフラ技術から考える理想のDevOps
Etsuji Nakai
 
PDF
Life with jupyter
Etsuji Nakai
 
PDF
DevOpsにおける組織に固有の事情を どのように整理するべきか
Etsuji Nakai
 
PDF
Deep Q-Network for beginners
Etsuji Nakai
 
PDF
インタークラウドを実現する技術 〜 デファクトスタンダードからの視点 〜
Etsuji Nakai
 
PDF
TensorFlowで学ぶDQN
Etsuji Nakai
 
PDF
Puppetが仲間外れにされて悲しいので、呼ばれてないのにPuppetの最新動向を話すよ
Hidetoshi Ochiai
 
PDF
Exploring the Philosophy behind Docker/Kubernetes/OpenShift
Etsuji Nakai
 
PDF
「TensorFlow Tutorialの数学的背景」 クイックツアー(パート1)
Etsuji Nakai
 
PDF
Open Shift v3 主要機能と内部構造のご紹介
Etsuji Nakai
 
PDF
機械学習概論 講義テキスト
Etsuji Nakai
 
PDF
Docker事始めと最新動向 2015年6月
Emma Haruka Iwao
 
PDF
Googleにおける機械学習の活用とクラウドサービス
Etsuji Nakai
 
Your first TensorFlow programming with Jupyter
Etsuji Nakai
 
TensorFlowによるニューラルネットワーク入門
Etsuji Nakai
 
TensorFlowプログラミングと分類アルゴリズムの基礎
Etsuji Nakai
 
A Brief History of My English Learning
Etsuji Nakai
 
Spannerに関する技術メモ
Etsuji Nakai
 
Using Kubernetes on Google Container Engine
Etsuji Nakai
 
Caffeの特徴と最近の動向 -CNN、そしてRNNへ-
Yasuyuki Sugai
 
Googleのインフラ技術から考える理想のDevOps
Etsuji Nakai
 
Life with jupyter
Etsuji Nakai
 
DevOpsにおける組織に固有の事情を どのように整理するべきか
Etsuji Nakai
 
Deep Q-Network for beginners
Etsuji Nakai
 
インタークラウドを実現する技術 〜 デファクトスタンダードからの視点 〜
Etsuji Nakai
 
TensorFlowで学ぶDQN
Etsuji Nakai
 
Puppetが仲間外れにされて悲しいので、呼ばれてないのにPuppetの最新動向を話すよ
Hidetoshi Ochiai
 
Exploring the Philosophy behind Docker/Kubernetes/OpenShift
Etsuji Nakai
 
「TensorFlow Tutorialの数学的背景」 クイックツアー(パート1)
Etsuji Nakai
 
Open Shift v3 主要機能と内部構造のご紹介
Etsuji Nakai
 
機械学習概論 講義テキスト
Etsuji Nakai
 
Docker事始めと最新動向 2015年6月
Emma Haruka Iwao
 
Googleにおける機械学習の活用とクラウドサービス
Etsuji Nakai
 
Ad

Similar to Machine Learning Basics for Web Application Developers (20)

PDF
Getting Started with Machine Learning
Humberto Marchezi
 
PPTX
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
PPTX
cnn.pptx
sghorai
 
PPTX
Deep learning with TensorFlow
Barbara Fusinska
 
PPTX
Java and Deep Learning
Oswald Campesato
 
PDF
Machine learning for IoT - unpacking the blackbox
Ivo Andreev
 
PPTX
# Neural network toolbox
VineetKumar508
 
PPTX
Introduction to Machine Learning - An overview and first step for candidate d...
Lucas Jellema
 
PPTX
Introduction to Convolutional Neural Network.pptx
zikoAr
 
PDF
Machine Learning 101 - AWS Machine Learning Web Day
AWS Germany
 
PDF
Integrating Artificial Intelligence with IoT
bplay2086
 
PPTX
Introduction overviewmachinelearning sig Door Lucas Jellema
Getting value from IoT, Integration and Data Analytics
 
PDF
Hands_On_Machine_Learning_with_Scikit_Le.pdf
Shems192009
 
PPTX
The Art of Intelligence – A Practical Introduction Machine Learning for Oracl...
Lucas Jellema
 
PDF
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
Lucas Jellema
 
PDF
MLHEP Lectures - day 1, basic track
arogozhnikov
 
PDF
IRJET- Machine Learning based Object Identification System using Python
IRJET Journal
 
PPTX
Java and Deep Learning (Introduction)
Oswald Campesato
 
PDF
Machine learning pt.1: Artificial Neural Networks ® All Rights Reserved
Jonathan Mitchell
 
Getting Started with Machine Learning
Humberto Marchezi
 
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
cnn.pptx
sghorai
 
Deep learning with TensorFlow
Barbara Fusinska
 
Java and Deep Learning
Oswald Campesato
 
Machine learning for IoT - unpacking the blackbox
Ivo Andreev
 
# Neural network toolbox
VineetKumar508
 
Introduction to Machine Learning - An overview and first step for candidate d...
Lucas Jellema
 
Introduction to Convolutional Neural Network.pptx
zikoAr
 
Machine Learning 101 - AWS Machine Learning Web Day
AWS Germany
 
Integrating Artificial Intelligence with IoT
bplay2086
 
Introduction overviewmachinelearning sig Door Lucas Jellema
Getting value from IoT, Integration and Data Analytics
 
Hands_On_Machine_Learning_with_Scikit_Le.pdf
Shems192009
 
The Art of Intelligence – A Practical Introduction Machine Learning for Oracl...
Lucas Jellema
 
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
Lucas Jellema
 
MLHEP Lectures - day 1, basic track
arogozhnikov
 
IRJET- Machine Learning based Object Identification System using Python
IRJET Journal
 
Java and Deep Learning (Introduction)
Oswald Campesato
 
Machine learning pt.1: Artificial Neural Networks ® All Rights Reserved
Jonathan Mitchell
 
Ad

More from Etsuji Nakai (13)

PDF
PRML11.2-11.3
Etsuji Nakai
 
PDF
「ITエンジニアリングの本質」を考える
Etsuji Nakai
 
PDF
Googleのインフラ技術に見る基盤標準化とDevOpsの真実
Etsuji Nakai
 
PDF
Lecture note on PRML 8.2
Etsuji Nakai
 
PDF
PRML7.2
Etsuji Nakai
 
PDF
Docker活用パターンの整理 ― どう組み合わせるのが正解?!
Etsuji Nakai
 
PDF
Docker with RHEL7 技術勉強会
Etsuji Nakai
 
PDF
分散ストレージソフトウェアCeph・アーキテクチャー概要
Etsuji Nakai
 
PDF
OpenStackとDockerの未来像
Etsuji Nakai
 
PDF
OpenShift v3 Technical Introduction
Etsuji Nakai
 
PDF
OpenStackをさらに”使う”技術 - OpenStack&Docker活用テクニック
Etsuji Nakai
 
PDF
Python 機械学習プログラミング データ分析演習編
Etsuji Nakai
 
PDF
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Etsuji Nakai
 
PRML11.2-11.3
Etsuji Nakai
 
「ITエンジニアリングの本質」を考える
Etsuji Nakai
 
Googleのインフラ技術に見る基盤標準化とDevOpsの真実
Etsuji Nakai
 
Lecture note on PRML 8.2
Etsuji Nakai
 
PRML7.2
Etsuji Nakai
 
Docker活用パターンの整理 ― どう組み合わせるのが正解?!
Etsuji Nakai
 
Docker with RHEL7 技術勉強会
Etsuji Nakai
 
分散ストレージソフトウェアCeph・アーキテクチャー概要
Etsuji Nakai
 
OpenStackとDockerの未来像
Etsuji Nakai
 
OpenShift v3 Technical Introduction
Etsuji Nakai
 
OpenStackをさらに”使う”技術 - OpenStack&Docker活用テクニック
Etsuji Nakai
 
Python 機械学習プログラミング データ分析演習編
Etsuji Nakai
 
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Etsuji Nakai
 

Recently uploaded (20)

PDF
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
PDF
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
PDF
Python Conference Singapore - 19 Jun 2025
ninefyi
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PDF
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
PPTX
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
PDF
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
PDF
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
PPTX
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
PDF
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
PDF
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
PDF
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
PDF
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
PPTX
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
PDF
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
ninefyi
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
The Growing Value and Application of FME & GenAI
Safe Software
 
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 

Machine Learning Basics for Web Application Developers

  • 1. Google confidential | Do not distribute Machine Learning Basics for Web Application Developers Etsuji Nakai Cloud Solutions Architect at Google 2016/08/19 ver1.2
  • 2. $ who am i ▪Etsuji Nakai Cloud Solutions Architect at Google Twitter @enakai00
  • 4. Linear Binary Classifier ▪ Build a model to classify two types of data with a straight line. ● The model will predict the probability of being in the positive class for new data. ● It’s like predicting if the patient is infected with a specific virus based on the preliminary check result. ▪ Observe how the model is trained on “Neural Network Playground” ● http://goo.gl/A2G4Hv x : Positive o : Negative
  • 5. Logistic Regression ▪ The straight line can be represented as below, which can be translated to a probability through the logistic function σ. ▪ “To train the model” is to adjust the parameters so that the model fits in the training dataset. Logistic function σ Probability of being positive The value of f increases in this direction
  • 6. How to measure “fitness” of the model ▪ You define the “loss function” which indicates the non-fitness of the model. Then ML algorithms adjust parameters to minimize the loss function. ● In logistic regression, you adjust the parameters to maximize the probability of giving a perfect prediction for the training dataset. ● For example, suppose that n-th data is given as and its correct label is (1=x, 0=o). Then the probability that the model gives the correct prediction for this data is: ● Hence the probability of giving correct predictions for all data is: ● By defining the loss function E as below, you cal tell ML algorithms to minimize it.
  • 7. Graphical Understanding of Linear Classifier ▪ Drawing 3-dimensional graph of , you can see that the “tilted flat plane” divides the plane into two classes.
  • 8. Linear Multiclass Classifier (Hardmax) ▪ How can you divide the plane into three classes (instead of two)? ▪ You can define three liner functions and classify the point based on “which of them has the maximum value at that point.” ● It is equivalent to dividing with the three tilted flat planes.
  • 9. Linear Multiclass Classifier (Softmax) ▪ You can define the probability that belongs to the i-th class as below: ▪ This translates the magnitude of into the probability satisfying the following conditions. One dimensional example of the softmax translation.
  • 11. Classifying Images with Softmax function ▪ For example, a gray scale image with 28x28 pixels can be represented as a 784 dimensional vector. (i.e a collection of 784 float numbers.) ● In other word, it corresponds to a single point in a 784 dimensional space! ▪ When you spread a bunch of images into this 784 dimensional space, similar images may come together to form clusters of images. ● If this is a correct assumption, you can classify the images by dividing the 784 dimensional space with the softmax function.
  • 12. Let’s try with TensorFlow Correct Incorrect http://goo.gl/rGqjYh ▪ You can see the code and its result (92% accuracy). * Comments are in Japanese.
  • 13. Improving Accuracy using CNN Raw Image Softmax Function Pooling Layer Convolution Filter ・・・ Convolution Filter ・・・ ・・・ Dropout Layer Fully-connected Layer Pooling Layer Convolution Filter ・・・ Convolution Filter Pooling Layer ・・・ Pooling Layer ▪ Instead of providing the raw image data into the softmax function, you can extract “features” of images through convolutional filters and pooling layers.
  • 14. Let’s try with TensorFlow http://goo.gl/UHsVmI http://goo.gl/VE2ISf ▪ You can see the code and its result (99.2% accuracy).
  • 15. A new Book for TensorFlow and CNN! https://www.amazon.co.jp/dp/4839960887/ * This is available only in Japanese now. Please ask publishers in your region to make a translation ;)
  • 17. API services for pre-trained models http://goo.gl/dh6cwB ▪ See an example. Send Image Client Cloud Service Reply the location of faces and their emotions.
  • 18. Smile Detection from Webcam Images ▪ The browser code sends webcam images to Google Vision API and notify when you’re smiling ;) http://goo.gl/9EM8tr
  • 19. Cucumber Classification with TensorFlow ▪ A cucumber farmer built an original “Cucumber sorter” using TensorFlow. ▪ Client application running on RasPi works with the Aruduino Micro to control the belt conveyor and the sorting devices. https://cloud.google.com/blog/big-data/2016/08/how-a-japanese-cucumber-farmer-is-using-deep-learning-and-tensorflow
  • 20. Other Possible Architectures ▪ Providing additional data to a pre-trained model to fine-tune it for your specific purpose. ● Technically referred as “Transfer Learning.” ▪ Running trained model on the client. ● You need a lot of computing resource to train the model. But you can use the trained model directly on the client. ▪ Realtime model training on the client? ● Considering the increasing computing resource available on the client, you may be able to train the model dynamically on the client using realtime data (such as webcam images) available on the client.
  • 21. Similarity between model training and application development Revised Model Additional Data Revised Model Final Model Applications API access Training Production environment Test Test Upgrade models Training Fix and retry success fail Existing Models Version control of models Model tunings Preprocess and feed Deploy new models ▪ This resembles the software development model (CI/CD). ▪ There will be some de-fact tools to build this framework in near future (maybe.) Existing Models Existing Models