SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Osemeke Isibor,
Solutions Architect.
iosemeke@amazon.com
31st October 2017
Introduction to Machine Learning,
Deep Learning and MXNet
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• Introduction
• Machine Learning
• Deep Learning
• MXNet
• Conclusion
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Introduction
Artificial Intelligence
Machine Learning
Deep Learning
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Timeline Of Intelligent Machines
1950 1952 1957 1979 1986 1997 2011 2012 2014 2016
The Learning
Machine (Alan Turing)
Machine Playing Checker
(Author Samuel)
Perceptron
(Frank Rosenblatt)
Stanford Cart
Backpropagation
(D. Rumelhart, G. Hinton, R. Williams)
Deep Blue Beats
Kasparov
Watson Wins Jeopardy
DeepMind Wins GoGoogle NN recognizing
cat in Youtube
Facebook DeepFace,
Amazon Echo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Machine Learning?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Marketing Offer On A New Product
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Option 1- Build A Rule Engine
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
40 M 1/3/2017 Books
…. …… ….. …..
Input Output
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
…. …… ….. …..
Rule 1: 15 <age< 30
Rule 2: Bought Toy=Y, Last
Purchase<30 days
Rule 3: Gender = ‘M’, Bought
Toy =‘Y’
Rule 4: ……..
Rule 5: ……..
Human
Programmer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Problem with Hand
Designed Rules
Adaptability
Scalability
Closed Loop
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Option 2 - Learn The Business Rules From Data
Age Gender Purchase
Date
Items
30 M 3/20/2017 Toy *
40 M 1/3/2017 Books
…. …… ….. …..
Learning
Algorithm
Model
Output
Historical Purchase Data
(Training Data)
Prediction
Age Gender Items
35 F
39 M Toy
Input - New Unseen Data
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We Call This Approach Machine Learning
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why Use Machine Learning?
• Use ML when you can’t code it
• Complex tasks where deterministic solution don’t suffice
• E.g. Recognizing speech/images
• Use ML when you can’t scale it
• Replace repetitive tasks needing human like expertise
• E.g Recommendations, spam, fraud detection, machine translation.
• Use ML when you have to adapt/personalize
• E.g. Recommendation and personalization
• Use ML when you can’t track it
• E.g. Automated driving, fraud detection.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Types Of Machine Learning
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Supervised Learning
It is a cat.
No, it’s a
Labrador.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Supervised Learning – How Machine Learn
Human intervention and validation required
e.g. Photo classification and tagging
Input
Label
Machine
Learning
Algorithm
Labrador
Prediction
Cat
Training Data
?
Label
Labrador
Adjust Model
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Unsupervised Learning
No human intervention required
(e.g. Customer segmentation)
Input
Machine
Learning
Algorithm
Prediction
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training – Split training data
All Labeled Dataset
Training Data
70% 30%
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training – Training w/ training data
All Labeled Dataset
Training Data
70% 30%
Training
Trial
Model
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training – Split the test data
All Labeled Dataset
Training Data
70% 30%
Training
Trial
Model
Test
Data
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training – Model evaluation
All Labeled Dataset
Training Data
70% 30%
Training
Test
Data
Evaluation
Result
Trial
Model
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training - Performance Measurement
All Labeled Dataset
Training Data
70% 30%
Training
Test
Data
Evaluation
Result
Trial
Model
Accuracy
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deep Learning
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Deep Learning?
• Deep Learning is a subfield of machine learning
concerned with algorithms inspired by the structure
and function of the brain called artificial neural
networks.
• Data is passed through multiple non-linear
transformations to generate a prediction
• Objective: Learn the parameters of the transformations
that minimize a cost function
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Performance
Data
Performance
Traditional Machine
Learning Algorithms
Deep Learning Algorithms
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sample Deep Learning Use Cases
ASR/NLU Language Translation Self Driving Cars
Playing Go Financial Risk Medical Diagnosis
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Algorithms
Data
Programming
Models
GPUs	&
Acceleration
The Advent of Deep Learning
image understanding
natural language
processing
speech recognition
autonomy
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Artificial Neuron/Perceptron
Input:
Vector of training data x
Output:
Linear function of input
Nonlinearity:
Transform output into desired
range of value
Training
Learn the weights and bias b
by minimize loss
f(x) = 𝜎 (⟨w, x⟩ + b)
X0
X1
X2
Xn
…
w0
w1
w2
wn
OutputInputs
⟨w, x⟩ 𝜎
Neuron
b
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Human Brain Neuron
Inputs Output
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Neural Network
X0
Xn
Neuron 0
Neuron n
Neuron 0
Neuron n
Output
Neuron
Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer
……
……
……
w1
0
w1
1
w1
2
w1
3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Neural Network – Forward Propagation
X0
Xn
Neuron 0
Neuron n
Neuron 0
Neuron n
Output
Neuron
Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer
……
……
……
Input 5
w1
0
w1
1
w1
2
w1
3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Neural Network – Backpropagation
X0
Xn
Neuron 0
Neuron n
Neuron 0
Neuron n
Output
Neuron
Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer
……
……
……
5
Label
4
?
Input
Error/Loss
Error/LossError/Loss
Error/Loss Error/Loss
w1
0
w1
1
w1
2
w1
3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Neural Network – Backpropagation
X0
Xn
Neuron 0
Neuron n
Neuron 0
Neuron n
Output
Neuron
Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer
……
……
……
5
Label
4
?
Error/Loss
Input
Error/LossError/Loss
Error/Loss Error/Loss
W1’
0
W1’
1
W1’
2
W1’
3
Update
weights
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Classification
Computer Vision – Deep Learning Approach
Raw Image Pixels
Edge Detection
Object Parts Detection
(Combination of edges)
Object Model Detection
Object Prediction
Feature
Extraction
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
你
好
吗
“How”
“Are”
“You”
Encoder Decoder
0.643
0.875
0.345
.
.
Input
One Word At a
Time
Model ModelEncoded Vector
Output
One Word At a
Time
Memory of previous word
influences next result
Memory of previous word
influences next result
Language Translation – Deep Learning Approach
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo – http://amzn.to/takeselfie
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MXNet
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Flexible - Supports both imperative and symbolic programming
• Portable - Runs on CPUs or GPUs, on clusters, servers, desktops, or mobile phones
• Multiple Languages - C++, Python, R, Scala, Julia, Matlab, Javascript, and Perl
• Distributed on Cloud - Supports distributed training on multiple CPU/GPU machines
• Performance Optimized - Optimized C++ backend engine parallelizes both I/O and
computation
• Broad Model Support - CNN, RNN/LSTM
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MXNet Architecture
BLAS Dep Engine Comm
ND
Array
Symbolic Expr
Binder
KV
Store
User Facing
Modules
System
Modules
…CPU GPU Android iOS Hardware &
OS
C++ Python R Julia… Language
Interface
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MXNet API Components
• NDArray – Provides imperative tensor operations
• Symbol – Provides neural network graph and auto-
differentiation
• RNN Cell – Tools for building RNN symbolic graph
• Module – Provides interface for performing
computation with Symbol
• Data Loading – Provides iterators for reading data
• Metric - Evaluation metric to evaluate performance of
trained model
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model training flow in MXNet
Data
Loading
Input Data
(text, image,
sound, …)
Data Iterator
(NDArrayIter,
CSVIter, …)
Symbol,
RNN Cell
Module
Data Loading and Processing
Network Graph &
Error Function
Learned Model
(Network Graph,
Parameters)
Model Training
Optimizer
(sgd, adam, …)
Context
(cpu,gpu)
Metric
(acc, mse, … )
Device
Selection
Optimizer
Selection
Metric
Selection
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Distributed Deep Learning – Data Parallelism
Data Shards
Model
Replica
Parameter Server W ’ = W - 𝛼∆W
W ∆W W ∆W ∆WW
Data Shards Data Shards
Model
Replica
Model
Replica
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Distributed Deep Learning – Model Parallelism
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Conclusion: Get Started
https://aws.amazon.com/amazon-ai/what-is-ai/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Osemeke Isibor,
Solutions Architect
iosemeke@amazon.com

Weitere ähnliche Inhalte

Was ist angesagt?

Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Simplilearn
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
Lukas Masuch
 
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
Simplilearn
 

Was ist angesagt? (20)

Artificial Intelligence - Machine Learning Vs Deep Learning
Artificial Intelligence - Machine Learning Vs Deep LearningArtificial Intelligence - Machine Learning Vs Deep Learning
Artificial Intelligence - Machine Learning Vs Deep Learning
 
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
Deep Learning Tutorial | Deep Learning Tutorial For Beginners | What Is Deep ...
 
What is Data Analysis and Machine Learning?
What is Data Analysis and Machine Learning?What is Data Analysis and Machine Learning?
What is Data Analysis and Machine Learning?
 
MIT Deep Learning Basics: Introduction and Overview by Lex Fridman
MIT Deep Learning Basics: Introduction and Overview by Lex FridmanMIT Deep Learning Basics: Introduction and Overview by Lex Fridman
MIT Deep Learning Basics: Introduction and Overview by Lex Fridman
 
What is Deep Learning?
What is Deep Learning?What is Deep Learning?
What is Deep Learning?
 
Introduction to Artificial Intelligence | AI using Deep Learning | Edureka
Introduction to Artificial Intelligence | AI using Deep Learning | EdurekaIntroduction to Artificial Intelligence | AI using Deep Learning | Edureka
Introduction to Artificial Intelligence | AI using Deep Learning | Edureka
 
Deep Learning Explained: The future of Artificial Intelligence and Smart Netw...
Deep Learning Explained: The future of Artificial Intelligence and Smart Netw...Deep Learning Explained: The future of Artificial Intelligence and Smart Netw...
Deep Learning Explained: The future of Artificial Intelligence and Smart Netw...
 
Deep Learning for Computer Vision: Image Classification (UPC 2016)
Deep Learning for Computer Vision: Image Classification (UPC 2016)Deep Learning for Computer Vision: Image Classification (UPC 2016)
Deep Learning for Computer Vision: Image Classification (UPC 2016)
 
AI vs Machine Learning vs Deep Learning | Machine Learning Training with Pyth...
AI vs Machine Learning vs Deep Learning | Machine Learning Training with Pyth...AI vs Machine Learning vs Deep Learning | Machine Learning Training with Pyth...
AI vs Machine Learning vs Deep Learning | Machine Learning Training with Pyth...
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
 
Tutorial on Deep learning and Applications
Tutorial on Deep learning and ApplicationsTutorial on Deep learning and Applications
Tutorial on Deep learning and Applications
 
Rethinking Data Augmentation for Image Super-resolution: A Comprehensive Anal...
Rethinking Data Augmentation for Image Super-resolution: A Comprehensive Anal...Rethinking Data Augmentation for Image Super-resolution: A Comprehensive Anal...
Rethinking Data Augmentation for Image Super-resolution: A Comprehensive Anal...
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial Networks
 
Computer Vision - Stereo Vision
Computer Vision - Stereo VisionComputer Vision - Stereo Vision
Computer Vision - Stereo Vision
 
Computer vision introduction
Computer vision  introduction Computer vision  introduction
Computer vision introduction
 
An introduction to Deep Learning
An introduction to Deep LearningAn introduction to Deep Learning
An introduction to Deep Learning
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 

Andere mochten auch

Andere mochten auch (20)

AI and Machine Learning Services
AI and Machine Learning ServicesAI and Machine Learning Services
AI and Machine Learning Services
 
Google Analytics 101 for Business - How to Get Started With Google Analytics
Google Analytics 101 for Business - How to Get Started With Google AnalyticsGoogle Analytics 101 for Business - How to Get Started With Google Analytics
Google Analytics 101 for Business - How to Get Started With Google Analytics
 
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
 
Managing Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksManaging Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech Talks
 
Analytics on AWS with Amazon Redshift, Amazon QuickSight, and Amazon Machine ...
Analytics on AWS with Amazon Redshift, Amazon QuickSight, and Amazon Machine ...Analytics on AWS with Amazon Redshift, Amazon QuickSight, and Amazon Machine ...
Analytics on AWS with Amazon Redshift, Amazon QuickSight, and Amazon Machine ...
 
You Don’t Need A Mobile App! Responsive Web Apps Using AWS
You Don’t Need A Mobile App! Responsive Web Apps Using AWSYou Don’t Need A Mobile App! Responsive Web Apps Using AWS
You Don’t Need A Mobile App! Responsive Web Apps Using AWS
 
Turn Big Data Into Big Value On Informatica and Amazon
Turn Big Data Into Big Value On Informatica and AmazonTurn Big Data Into Big Value On Informatica and Amazon
Turn Big Data Into Big Value On Informatica and Amazon
 
The People Model & Cloud Transformation - Transformation Day Public Sector Lo...
The People Model & Cloud Transformation - Transformation Day Public Sector Lo...The People Model & Cloud Transformation - Transformation Day Public Sector Lo...
The People Model & Cloud Transformation - Transformation Day Public Sector Lo...
 
Internet of Things (IoT) with Intel
Internet of Things (IoT) with IntelInternet of Things (IoT) with Intel
Internet of Things (IoT) with Intel
 
Influencing the C-Suite to Champion Your Journey to the Cloud
Influencing the C-Suite to Champion Your Journey to the CloudInfluencing the C-Suite to Champion Your Journey to the Cloud
Influencing the C-Suite to Champion Your Journey to the Cloud
 
Architecting an Open Data Lake for the Enterprise
 Architecting an Open Data Lake for the Enterprise  Architecting an Open Data Lake for the Enterprise
Architecting an Open Data Lake for the Enterprise
 
PASS 17: RDS SQL Server on Amazon Web Services Overview
PASS 17: RDS SQL Server on Amazon Web Services OverviewPASS 17: RDS SQL Server on Amazon Web Services Overview
PASS 17: RDS SQL Server on Amazon Web Services Overview
 
AWS 機器學習 II ─ 深度學習 Deep Learning & MXNet
AWS 機器學習 II ─ 深度學習 Deep Learning & MXNetAWS 機器學習 II ─ 深度學習 Deep Learning & MXNet
AWS 機器學習 II ─ 深度學習 Deep Learning & MXNet
 
Getting Started with Serverless Apps
Getting Started with Serverless AppsGetting Started with Serverless Apps
Getting Started with Serverless Apps
 
Incident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseIncident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat Response
 
Build Cloud-Connected Apps in React Native for iOS & Android.pdf
Build Cloud-Connected Apps in React Native for iOS & Android.pdfBuild Cloud-Connected Apps in React Native for iOS & Android.pdf
Build Cloud-Connected Apps in React Native for iOS & Android.pdf
 
Achieving Compliance and Selling to Regulated Markets on AWS
Achieving Compliance and Selling to Regulated Markets on AWSAchieving Compliance and Selling to Regulated Markets on AWS
Achieving Compliance and Selling to Regulated Markets on AWS
 
Digital Transformation - Transformation Day Public Sector London 2017
Digital Transformation - Transformation Day Public Sector London 2017Digital Transformation - Transformation Day Public Sector London 2017
Digital Transformation - Transformation Day Public Sector London 2017
 
PASS 17 SQL Server on AWS Best Practices
PASS 17 SQL Server on AWS Best PracticesPASS 17 SQL Server on AWS Best Practices
PASS 17 SQL Server on AWS Best Practices
 
運用大數據掌握您的客戶
運用大數據掌握您的客戶運用大數據掌握您的客戶
運用大數據掌握您的客戶
 

Ähnlich wie Introduction to Machine Learning, Deep Learning and MXNet

Ähnlich wie Introduction to Machine Learning, Deep Learning and MXNet (20)

Deep Learning Fundamentals
Deep Learning FundamentalsDeep Learning Fundamentals
Deep Learning Fundamentals
 
Deep Learning Workshop
Deep Learning WorkshopDeep Learning Workshop
Deep Learning Workshop
 
MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and GluonMCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
 
What is deep learning (and why you should care) - Talk at SJSU Oct 2018
What is deep learning (and why you should care) - Talk at SJSU Oct 2018What is deep learning (and why you should care) - Talk at SJSU Oct 2018
What is deep learning (and why you should care) - Talk at SJSU Oct 2018
 
GPSBUS201-GPS Demystifying Artificial Intelligence
GPSBUS201-GPS Demystifying Artificial IntelligenceGPSBUS201-GPS Demystifying Artificial Intelligence
GPSBUS201-GPS Demystifying Artificial Intelligence
 
Emotion Recognition in Images
Emotion Recognition in ImagesEmotion Recognition in Images
Emotion Recognition in Images
 
Maschinelles Lernen auf AWS für Entwickler, Data Scientists und Experten
Maschinelles Lernen auf AWS für Entwickler, Data Scientists und ExpertenMaschinelles Lernen auf AWS für Entwickler, Data Scientists und Experten
Maschinelles Lernen auf AWS für Entwickler, Data Scientists und Experten
 
Build, train, and deploy machine learning models at scale - AWS Summit Cape T...
Build, train, and deploy machine learning models at scale - AWS Summit Cape T...Build, train, and deploy machine learning models at scale - AWS Summit Cape T...
Build, train, and deploy machine learning models at scale - AWS Summit Cape T...
 
NEW LAUNCH! Introducing Amazon SageMaker - MCL365 - re:Invent 2017
NEW LAUNCH! Introducing Amazon SageMaker - MCL365 - re:Invent 2017NEW LAUNCH! Introducing Amazon SageMaker - MCL365 - re:Invent 2017
NEW LAUNCH! Introducing Amazon SageMaker - MCL365 - re:Invent 2017
 
Moving Forward with AI
Moving Forward with AIMoving Forward with AI
Moving Forward with AI
 
AI / ML Services - re:Invent Comes to London 2.0
AI / ML Services - re:Invent Comes to London 2.0AI / ML Services - re:Invent Comes to London 2.0
AI / ML Services - re:Invent Comes to London 2.0
 
GPSTEC201_Building an Artificial Intelligence Practice for Consulting Partners
GPSTEC201_Building an Artificial Intelligence Practice for Consulting PartnersGPSTEC201_Building an Artificial Intelligence Practice for Consulting Partners
GPSTEC201_Building an Artificial Intelligence Practice for Consulting Partners
 
Emotion recognition in images: from idea to a model in production - Nordic DS...
Emotion recognition in images: from idea to a model in production - Nordic DS...Emotion recognition in images: from idea to a model in production - Nordic DS...
Emotion recognition in images: from idea to a model in production - Nordic DS...
 
Generative Adversarial Networks (GANs) using Apache MXNet
Generative Adversarial Networks (GANs) using Apache MXNetGenerative Adversarial Networks (GANs) using Apache MXNet
Generative Adversarial Networks (GANs) using Apache MXNet
 
Artificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to StartArtificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to Start
 
Enhanced Media Workflows Using Amazon AI
Enhanced Media Workflows Using Amazon AIEnhanced Media Workflows Using Amazon AI
Enhanced Media Workflows Using Amazon AI
 
Moving Forward with AI - as presented at the Prosessipäivät 2018
Moving Forward with AI - as presented at the Prosessipäivät 2018Moving Forward with AI - as presented at the Prosessipäivät 2018
Moving Forward with AI - as presented at the Prosessipäivät 2018
 
Amazon SageMaker Algorithms: Machine Learning Week San Francisco
Amazon SageMaker Algorithms: Machine Learning Week San FranciscoAmazon SageMaker Algorithms: Machine Learning Week San Francisco
Amazon SageMaker Algorithms: Machine Learning Week San Francisco
 
MCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and GluonMCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and Gluon
 
Artificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to StartArtificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to Start
 

Mehr von Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Introduction to Machine Learning, Deep Learning and MXNet

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Osemeke Isibor, Solutions Architect. iosemeke@amazon.com 31st October 2017 Introduction to Machine Learning, Deep Learning and MXNet
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • Introduction • Machine Learning • Deep Learning • MXNet • Conclusion
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Introduction Artificial Intelligence Machine Learning Deep Learning
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Timeline Of Intelligent Machines 1950 1952 1957 1979 1986 1997 2011 2012 2014 2016 The Learning Machine (Alan Turing) Machine Playing Checker (Author Samuel) Perceptron (Frank Rosenblatt) Stanford Cart Backpropagation (D. Rumelhart, G. Hinton, R. Williams) Deep Blue Beats Kasparov Watson Wins Jeopardy DeepMind Wins GoGoogle NN recognizing cat in Youtube Facebook DeepFace, Amazon Echo
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Machine Learning?
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Marketing Offer On A New Product
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Option 1- Build A Rule Engine Age Gender Purchase Date Items 30 M 3/1/2017 Toy 40 M 1/3/2017 Books …. …… ….. ….. Input Output Age Gender Purchase Date Items 30 M 3/1/2017 Toy …. …… ….. ….. Rule 1: 15 <age< 30 Rule 2: Bought Toy=Y, Last Purchase<30 days Rule 3: Gender = ‘M’, Bought Toy =‘Y’ Rule 4: …….. Rule 5: …….. Human Programmer
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Problem with Hand Designed Rules Adaptability Scalability Closed Loop
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Option 2 - Learn The Business Rules From Data Age Gender Purchase Date Items 30 M 3/20/2017 Toy * 40 M 1/3/2017 Books …. …… ….. ….. Learning Algorithm Model Output Historical Purchase Data (Training Data) Prediction Age Gender Items 35 F 39 M Toy Input - New Unseen Data
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We Call This Approach Machine Learning
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why Use Machine Learning? • Use ML when you can’t code it • Complex tasks where deterministic solution don’t suffice • E.g. Recognizing speech/images • Use ML when you can’t scale it • Replace repetitive tasks needing human like expertise • E.g Recommendations, spam, fraud detection, machine translation. • Use ML when you have to adapt/personalize • E.g. Recommendation and personalization • Use ML when you can’t track it • E.g. Automated driving, fraud detection.
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Types Of Machine Learning
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Supervised Learning It is a cat. No, it’s a Labrador.
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Supervised Learning – How Machine Learn Human intervention and validation required e.g. Photo classification and tagging Input Label Machine Learning Algorithm Labrador Prediction Cat Training Data ? Label Labrador Adjust Model
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Unsupervised Learning No human intervention required (e.g. Customer segmentation) Input Machine Learning Algorithm Prediction
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training – Split training data All Labeled Dataset Training Data 70% 30%
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training – Training w/ training data All Labeled Dataset Training Data 70% 30% Training Trial Model
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training – Split the test data All Labeled Dataset Training Data 70% 30% Training Trial Model Test Data
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training – Model evaluation All Labeled Dataset Training Data 70% 30% Training Test Data Evaluation Result Trial Model
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training - Performance Measurement All Labeled Dataset Training Data 70% 30% Training Test Data Evaluation Result Trial Model Accuracy
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Deep Learning? • Deep Learning is a subfield of machine learning concerned with algorithms inspired by the structure and function of the brain called artificial neural networks. • Data is passed through multiple non-linear transformations to generate a prediction • Objective: Learn the parameters of the transformations that minimize a cost function
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Performance Data Performance Traditional Machine Learning Algorithms Deep Learning Algorithms
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sample Deep Learning Use Cases ASR/NLU Language Translation Self Driving Cars Playing Go Financial Risk Medical Diagnosis
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Algorithms Data Programming Models GPUs & Acceleration The Advent of Deep Learning image understanding natural language processing speech recognition autonomy
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Artificial Neuron/Perceptron Input: Vector of training data x Output: Linear function of input Nonlinearity: Transform output into desired range of value Training Learn the weights and bias b by minimize loss f(x) = 𝜎 (⟨w, x⟩ + b) X0 X1 X2 Xn … w0 w1 w2 wn OutputInputs ⟨w, x⟩ 𝜎 Neuron b
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Human Brain Neuron Inputs Output
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Neural Network X0 Xn Neuron 0 Neuron n Neuron 0 Neuron n Output Neuron Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer …… …… …… w1 0 w1 1 w1 2 w1 3
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Neural Network – Forward Propagation X0 Xn Neuron 0 Neuron n Neuron 0 Neuron n Output Neuron Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer …… …… …… Input 5 w1 0 w1 1 w1 2 w1 3
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Neural Network – Backpropagation X0 Xn Neuron 0 Neuron n Neuron 0 Neuron n Output Neuron Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer …… …… …… 5 Label 4 ? Input Error/Loss Error/LossError/Loss Error/Loss Error/Loss w1 0 w1 1 w1 2 w1 3
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Neural Network – Backpropagation X0 Xn Neuron 0 Neuron n Neuron 0 Neuron n Output Neuron Input Layer Hidden Layer 1 Hidden Layer 2 Output Layer …… …… …… 5 Label 4 ? Error/Loss Input Error/LossError/Loss Error/Loss Error/Loss W1’ 0 W1’ 1 W1’ 2 W1’ 3 Update weights
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Classification Computer Vision – Deep Learning Approach Raw Image Pixels Edge Detection Object Parts Detection (Combination of edges) Object Model Detection Object Prediction Feature Extraction
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 你 好 吗 “How” “Are” “You” Encoder Decoder 0.643 0.875 0.345 . . Input One Word At a Time Model ModelEncoded Vector Output One Word At a Time Memory of previous word influences next result Memory of previous word influences next result Language Translation – Deep Learning Approach
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo – http://amzn.to/takeselfie
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MXNet
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Flexible - Supports both imperative and symbolic programming • Portable - Runs on CPUs or GPUs, on clusters, servers, desktops, or mobile phones • Multiple Languages - C++, Python, R, Scala, Julia, Matlab, Javascript, and Perl • Distributed on Cloud - Supports distributed training on multiple CPU/GPU machines • Performance Optimized - Optimized C++ backend engine parallelizes both I/O and computation • Broad Model Support - CNN, RNN/LSTM
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MXNet Architecture BLAS Dep Engine Comm ND Array Symbolic Expr Binder KV Store User Facing Modules System Modules …CPU GPU Android iOS Hardware & OS C++ Python R Julia… Language Interface
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MXNet API Components • NDArray – Provides imperative tensor operations • Symbol – Provides neural network graph and auto- differentiation • RNN Cell – Tools for building RNN symbolic graph • Module – Provides interface for performing computation with Symbol • Data Loading – Provides iterators for reading data • Metric - Evaluation metric to evaluate performance of trained model
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model training flow in MXNet Data Loading Input Data (text, image, sound, …) Data Iterator (NDArrayIter, CSVIter, …) Symbol, RNN Cell Module Data Loading and Processing Network Graph & Error Function Learned Model (Network Graph, Parameters) Model Training Optimizer (sgd, adam, …) Context (cpu,gpu) Metric (acc, mse, … ) Device Selection Optimizer Selection Metric Selection
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Distributed Deep Learning – Data Parallelism Data Shards Model Replica Parameter Server W ’ = W - 𝛼∆W W ∆W W ∆W ∆WW Data Shards Data Shards Model Replica Model Replica
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Distributed Deep Learning – Model Parallelism
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Conclusion: Get Started https://aws.amazon.com/amazon-ai/what-is-ai/
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Osemeke Isibor, Solutions Architect iosemeke@amazon.com