SlideShare a Scribd company logo
1 of 66
Download to read offline
Focus on model deployment
AI with Azure Machine
Learning
Pre-Built AI
Azure Cognitive Services
Conversational AI
Azure Bot Service
Custom AI
Azure Machine Learning
Artificial Intelligence
6
“Machine Learning is the field of study that
gives computers the ability to learn without
being explicitly programmed.”
-- Arthur Samuel, 1959
Types of machine learning
8
Supervised
Unsupervised
Semi supervised
Reinforcement learning
Supervised learning
▪ Training data includes the desired solution (called labels) and features
▪ E.g. predict house prices based on features of the house and neighborhood; you have a
data set that contains the house prices
▪ Classification (e.g. spam filter), regression (e.g. house price prediction)
9
Unsupervised learning
▪ Training data does not contain labels
10
2016: 96%
accuracy
RESNET vision
test (152 layer
neural network)
2017: 5.1%
switchboard
speech
recognition test
Jan 2018: 88.5%
SQuAD reading
comprehension
test
March 2018:
69.9% MT
research system
11
Challenges
▪ Not enough data: thousands or millions of examples
required depending on the problem
▪ Data is not representative
▪ Sampling noise
▪ Sampling bias
▪ Poor quality of data: importance of “data cleansing”
▪ Errors
▪ Outliers
▪ Noise
▪ Irrelevant features
▪ Overfitting and underfitting
12
How does it work?
The “Hello World” of machine learning
Linear Regression? Just use Excel!
y=b + w * x
But how can we find the parameters b and w?
▪ Linear regression has a closed-form solution: the normal equation
▪ Calculates b and w directly
▪ Slow if there are many features
▪ Learn the parameters iteratively
▪ “Gradient Descent” algorithm
▪ Just select a random b and w and check
the cost
▪ Modify b and w to obtain a lower cost
and keep doing that for a number of times
15
Cost function
▪ Basically measures the difference between
the real values (blue) and predicted values
(red)
▪ There is a red line with the lowest cost
▪ The goal is to find that line by “cleverly”
trying new combinations of b and w
16
Gradient Descent
17
Learning rate: size of the steps you take
18
Not just for straight lines
19
y=w1 * x^2 + w2 * x + b
Demo
▪ Linear Regression in a Jupyter
Notebook
20
21
Training models
Just the important bits to understand how models are built
Wait a moment! What’s Machine Learning?
▪ We will talk about supervised learning only
▪ Learn from labeled data
e.g. you have images of numbers and you know the actual number the image represents
e.g. you have images of cats and you know they are cats
▪ Make predictions on new samples
Learn a model
predict “label = 4” (based on the model)
Storage
Training a model (running experiments)
ComputeTrain.py
Python SDK
▪ Connect to your workspace
▪ Provision compute targets
▪ Upload data to storage
▪ Submit experiments
▪ Log training process
▪ Register models
▪ Deprovision compute targets
▪ Create container images
▪ Deploy as a web service
▪ ...
Training a model with train.py
▪ Load data from storage
▪ Fit ML model on the data
▪ use your framework of choice
▪ Save the model to storage
▪ Log metrics (e.g. accuracy) to Azure ML
Virtual
Machines
Azure ML
Compute
Kubernetes HDInsight
Azure
Databricks
Local
compute
Guided Exercise
▪ Log on to Azure Portal
▪ Create Azure ML service
▪ Log on to Azure Notebooks
▪ Perform the Getting Started exercise
(Monte Carlo simulation to calculate
Pi)
▪ uses local compute (of the
workbook)
30
Packaging Models
aka operationalizing models
aks run models in production
Storage
Packaging the model
ComputeTrain.py
Container
image
Score.py
Registered model
Scoring with score.py
▪ To make predictions (inference) you provide a score.py script
▪ Azure ML uses score.py to build an API you can deploy to computer targets
▪ The API is packaged in a Docker container
def init():
load(model)
def run(input)
prediction =
model(input)
return prediction
Storage
Custom models: Machine Learning Service
ComputeTrain.py
Container
image
Score.py
Registered model
Deploy ?
ONNX Models
We will use ONNX models and package them in a container
Why use ONNX?
▪ Better interoperability
▪ Spend less time to put models into production
▪ Ecosystem of tools for visualization and acceleration
▪ Converters
▪ Visualizers
Netron Visualizer
Guided Exercise
▪ Create a container image that uses
the ResNet50 model to classify
images
40
Deploying Models
Deploying models
▪ A model is a function to execute
▪ A model is deployed as a REST API endpoint
that you call from your custom application
▪ Inference = making decisions about new data
e.g. is it a cat?
Azure Container
Instances
Azure
Kubernetes
Service
Azure IoT Edge
Field-
programmable
gate array
(FPGA)
Deploy to Azure Container Instances (ACI)
▪ Simplest way to run
containers in Azure
▪ No need to think about
clusters
▪ Container groups with
multiple containers
Deploy to Azure Kubernetes Service (AKS)
▪ For high-scale production scenarios
▪ Use an existing AKS cluster or deploy from Azure ML
▪ More advanced capabilities
▪ Autoscaling
▪ Use of GPUs
▪ Monitoring and logging
GPUs on Kubernetes
▪ Deploy on GPU instances
▪ Ensure GPU capabilities are advertised
▪ use device plugins
▪ You need to specifically enable GPU
support in the container used for inference
Guided Exercise
▪ Deploying the ResNet50 model to
Azure Container Instances
▪ Inference with Python
▪ Inference with Go
50
On your own
▪ Deploying the FER+ (emotion
recognition for faces) model to Azure
Container Instances
▪ Inference with Python
51
customvision.ai
Transfer Learning Made Easy
Transfer Learning
Image from Medium
Predicting with the Prediction URL
▪ Post a URL or binary data to the prediction URL
▪ For binary data:
Export the model
▪ Set the domain to general compact: model will be smaller and potentially less accurate
▪ Export is now possible
Dockerfile
▪ Build the image with the included
Dockerfile:
▪ Push the image to a registry (e.g.
Docker Hub:
▪ docker push gbaeke/carmake
Run in ACI
Use container model
Running models at the edge
IoT Edge to the rescue
Deploy to IoT Edge
▪ IoT Edge provides the capability to
process telemetry at the network
edge
▪ Process data locally and forward to
the cloud when needed
▪ e.g. alert, run AI model, …
▪ IoT Edge uses modules and these
modules are containers
▪ Use IoT Hub to deploy an Azure
ML container to the edge device
Example of deployment to IoT Edge
FPGA
Deploy to FPGAs
▪ Array of programmable logic blocks and reconfigurable interconnects
▪ Configurable post-manufacturing
▪ Mainly used for inference (not for training)
Project Brainwave on Azure
▪ Based on Intel FPGA devices
▪ Available in Azure for real-time AI
(inference)
▪ Configurable for different types of pre-
trained deep neural networks (DNN)
▪ Image classification and recognition
▪ ResNet 50, ResNet 152, VGG-16, …
▪ High performance
> 500 classifications / second
▪ Not for your custom models
FPGA Speed Demo
68
care.grow.passion.

More Related Content

What's hot

201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0Mark Tabladillo
 
The Machine Learning Workflow with Azure
The Machine Learning Workflow with AzureThe Machine Learning Workflow with Azure
The Machine Learning Workflow with AzureIvo Andreev
 
201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0Mark Tabladillo
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated MLMark Tabladillo
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019Mark Tabladillo
 
201909 Automated ML for Developers
201909 Automated ML for Developers201909 Automated ML for Developers
201909 Automated ML for DevelopersMark Tabladillo
 
Introduction to Azure Machine Learning
Introduction to Azure Machine LearningIntroduction to Azure Machine Learning
Introduction to Azure Machine LearningPaul Prae
 
Introduction to ML.NET
Introduction to ML.NETIntroduction to ML.NET
Introduction to ML.NETMarco Parenzan
 
Azure AI platform - Automated ML workshop
Azure AI platform - Automated ML workshopAzure AI platform - Automated ML workshop
Azure AI platform - Automated ML workshopParashar Shah
 
201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusML201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusMLMark Tabladillo
 
Machine Learning With ML.NET
Machine Learning With ML.NETMachine Learning With ML.NET
Machine Learning With ML.NETDev Raj Gautam
 
Adventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE BytesAdventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE BytesDerek Graham
 
Machine Learning Classifiers
Machine Learning ClassifiersMachine Learning Classifiers
Machine Learning ClassifiersMostafa
 
The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?Ivo Andreev
 
Prepare your data for machine learning
Prepare your data for machine learningPrepare your data for machine learning
Prepare your data for machine learningIvo Andreev
 
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...Mark Tabladillo
 
AWS Machine Learning & Google Cloud Machine Learning
AWS Machine Learning & Google Cloud Machine LearningAWS Machine Learning & Google Cloud Machine Learning
AWS Machine Learning & Google Cloud Machine LearningSC5.io
 
Python Development in VS2019
Python Development in VS2019Python Development in VS2019
Python Development in VS2019Ivo Andreev
 

What's hot (20)

201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0
 
The Machine Learning Workflow with Azure
The Machine Learning Workflow with AzureThe Machine Learning Workflow with Azure
The Machine Learning Workflow with Azure
 
201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated ML
 
Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine Learning
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019
 
201909 Automated ML for Developers
201909 Automated ML for Developers201909 Automated ML for Developers
201909 Automated ML for Developers
 
Introduction to Azure Machine Learning
Introduction to Azure Machine LearningIntroduction to Azure Machine Learning
Introduction to Azure Machine Learning
 
Introduction to ML.NET
Introduction to ML.NETIntroduction to ML.NET
Introduction to ML.NET
 
Azure AI platform - Automated ML workshop
Azure AI platform - Automated ML workshopAzure AI platform - Automated ML workshop
Azure AI platform - Automated ML workshop
 
201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusML201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusML
 
Machine Learning With ML.NET
Machine Learning With ML.NETMachine Learning With ML.NET
Machine Learning With ML.NET
 
Adventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE BytesAdventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE Bytes
 
Machine Learning Classifiers
Machine Learning ClassifiersMachine Learning Classifiers
Machine Learning Classifiers
 
Knowledge Discovery
Knowledge DiscoveryKnowledge Discovery
Knowledge Discovery
 
The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?
 
Prepare your data for machine learning
Prepare your data for machine learningPrepare your data for machine learning
Prepare your data for machine learning
 
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
Insider's introduction to microsoft azure machine learning: 201411 Seattle Bu...
 
AWS Machine Learning & Google Cloud Machine Learning
AWS Machine Learning & Google Cloud Machine LearningAWS Machine Learning & Google Cloud Machine Learning
AWS Machine Learning & Google Cloud Machine Learning
 
Python Development in VS2019
Python Development in VS2019Python Development in VS2019
Python Development in VS2019
 

Similar to AI with Azure Machine Learning

Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossAndrew Flatters
 
I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)AZUG FR
 
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...Databricks
 
Deeplearning and dev ops azure
Deeplearning and dev ops azureDeeplearning and dev ops azure
Deeplearning and dev ops azureVishwas N
 
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDeploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDatabricks
 
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...Sotrender
 
Machine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud PlatformMachine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud PlatformMatthias Feys
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning serviceRuth Yakubu
 
Machine Learning Infrastructure
Machine Learning InfrastructureMachine Learning Infrastructure
Machine Learning InfrastructureSigOpt
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnBenjamin Bengfort
 
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysBuild and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysCodeOps Technologies LLP
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Conference
 
Deep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an IntroductionDeep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an IntroductionEmanuele Bezzi
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneIvo Andreev
 
Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101QuantUniversity
 
Productionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure MLProductionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure MLDatabricks
 
OpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyOpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyGanesan Narayanasamy
 

Similar to AI with Azure Machine Learning (20)

Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy Cross
 
I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)
 
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
 
Deeplearning and dev ops azure
Deeplearning and dev ops azureDeeplearning and dev ops azure
Deeplearning and dev ops azure
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
 
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDeploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
 
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
 
Machine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud PlatformMachine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud Platform
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
 
Machine Learning Infrastructure
Machine Learning InfrastructureMachine Learning Infrastructure
Machine Learning Infrastructure
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
 
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysBuild and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
 
Deep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an IntroductionDeep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an Introduction
 
Python ml
Python mlPython ml
Python ml
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for Everyone
 
Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101
 
Productionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure MLProductionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure ML
 
Machine learning
Machine learningMachine learning
Machine learning
 
OpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyOpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon Valley
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

AI with Azure Machine Learning

  • 1. Focus on model deployment AI with Azure Machine Learning
  • 2. Pre-Built AI Azure Cognitive Services Conversational AI Azure Bot Service Custom AI Azure Machine Learning
  • 3.
  • 5. 6
  • 6. “Machine Learning is the field of study that gives computers the ability to learn without being explicitly programmed.” -- Arthur Samuel, 1959
  • 7. Types of machine learning 8 Supervised Unsupervised Semi supervised Reinforcement learning
  • 8. Supervised learning ▪ Training data includes the desired solution (called labels) and features ▪ E.g. predict house prices based on features of the house and neighborhood; you have a data set that contains the house prices ▪ Classification (e.g. spam filter), regression (e.g. house price prediction) 9
  • 9. Unsupervised learning ▪ Training data does not contain labels 10
  • 10. 2016: 96% accuracy RESNET vision test (152 layer neural network) 2017: 5.1% switchboard speech recognition test Jan 2018: 88.5% SQuAD reading comprehension test March 2018: 69.9% MT research system 11
  • 11. Challenges ▪ Not enough data: thousands or millions of examples required depending on the problem ▪ Data is not representative ▪ Sampling noise ▪ Sampling bias ▪ Poor quality of data: importance of “data cleansing” ▪ Errors ▪ Outliers ▪ Noise ▪ Irrelevant features ▪ Overfitting and underfitting 12
  • 12. How does it work? The “Hello World” of machine learning
  • 13. Linear Regression? Just use Excel! y=b + w * x
  • 14. But how can we find the parameters b and w? ▪ Linear regression has a closed-form solution: the normal equation ▪ Calculates b and w directly ▪ Slow if there are many features ▪ Learn the parameters iteratively ▪ “Gradient Descent” algorithm ▪ Just select a random b and w and check the cost ▪ Modify b and w to obtain a lower cost and keep doing that for a number of times 15
  • 15. Cost function ▪ Basically measures the difference between the real values (blue) and predicted values (red) ▪ There is a red line with the lowest cost ▪ The goal is to find that line by “cleverly” trying new combinations of b and w 16
  • 17. Learning rate: size of the steps you take 18
  • 18. Not just for straight lines 19 y=w1 * x^2 + w2 * x + b
  • 19. Demo ▪ Linear Regression in a Jupyter Notebook 20
  • 20. 21
  • 21. Training models Just the important bits to understand how models are built
  • 22. Wait a moment! What’s Machine Learning? ▪ We will talk about supervised learning only ▪ Learn from labeled data e.g. you have images of numbers and you know the actual number the image represents e.g. you have images of cats and you know they are cats ▪ Make predictions on new samples Learn a model predict “label = 4” (based on the model)
  • 23. Storage Training a model (running experiments) ComputeTrain.py
  • 24. Python SDK ▪ Connect to your workspace ▪ Provision compute targets ▪ Upload data to storage ▪ Submit experiments ▪ Log training process ▪ Register models ▪ Deprovision compute targets ▪ Create container images ▪ Deploy as a web service ▪ ...
  • 25.
  • 26.
  • 27. Training a model with train.py ▪ Load data from storage ▪ Fit ML model on the data ▪ use your framework of choice ▪ Save the model to storage ▪ Log metrics (e.g. accuracy) to Azure ML
  • 29. Guided Exercise ▪ Log on to Azure Portal ▪ Create Azure ML service ▪ Log on to Azure Notebooks ▪ Perform the Getting Started exercise (Monte Carlo simulation to calculate Pi) ▪ uses local compute (of the workbook) 30
  • 30. Packaging Models aka operationalizing models aks run models in production
  • 32. Scoring with score.py ▪ To make predictions (inference) you provide a score.py script ▪ Azure ML uses score.py to build an API you can deploy to computer targets ▪ The API is packaged in a Docker container def init(): load(model) def run(input) prediction = model(input) return prediction
  • 33. Storage Custom models: Machine Learning Service ComputeTrain.py Container image Score.py Registered model Deploy ?
  • 34. ONNX Models We will use ONNX models and package them in a container
  • 35.
  • 36.
  • 37. Why use ONNX? ▪ Better interoperability ▪ Spend less time to put models into production ▪ Ecosystem of tools for visualization and acceleration ▪ Converters ▪ Visualizers
  • 39. Guided Exercise ▪ Create a container image that uses the ResNet50 model to classify images 40
  • 41. Deploying models ▪ A model is a function to execute ▪ A model is deployed as a REST API endpoint that you call from your custom application ▪ Inference = making decisions about new data e.g. is it a cat?
  • 42. Azure Container Instances Azure Kubernetes Service Azure IoT Edge Field- programmable gate array (FPGA)
  • 43. Deploy to Azure Container Instances (ACI) ▪ Simplest way to run containers in Azure ▪ No need to think about clusters ▪ Container groups with multiple containers
  • 44. Deploy to Azure Kubernetes Service (AKS) ▪ For high-scale production scenarios ▪ Use an existing AKS cluster or deploy from Azure ML ▪ More advanced capabilities ▪ Autoscaling ▪ Use of GPUs ▪ Monitoring and logging
  • 45.
  • 46. GPUs on Kubernetes ▪ Deploy on GPU instances ▪ Ensure GPU capabilities are advertised ▪ use device plugins ▪ You need to specifically enable GPU support in the container used for inference
  • 47. Guided Exercise ▪ Deploying the ResNet50 model to Azure Container Instances ▪ Inference with Python ▪ Inference with Go 50
  • 48. On your own ▪ Deploying the FER+ (emotion recognition for faces) model to Azure Container Instances ▪ Inference with Python 51
  • 51.
  • 52.
  • 53.
  • 54. Predicting with the Prediction URL ▪ Post a URL or binary data to the prediction URL ▪ For binary data:
  • 55. Export the model ▪ Set the domain to general compact: model will be smaller and potentially less accurate ▪ Export is now possible
  • 56. Dockerfile ▪ Build the image with the included Dockerfile: ▪ Push the image to a registry (e.g. Docker Hub: ▪ docker push gbaeke/carmake
  • 59. Running models at the edge IoT Edge to the rescue
  • 60. Deploy to IoT Edge ▪ IoT Edge provides the capability to process telemetry at the network edge ▪ Process data locally and forward to the cloud when needed ▪ e.g. alert, run AI model, … ▪ IoT Edge uses modules and these modules are containers ▪ Use IoT Hub to deploy an Azure ML container to the edge device
  • 61. Example of deployment to IoT Edge
  • 62. FPGA
  • 63. Deploy to FPGAs ▪ Array of programmable logic blocks and reconfigurable interconnects ▪ Configurable post-manufacturing ▪ Mainly used for inference (not for training)
  • 64. Project Brainwave on Azure ▪ Based on Intel FPGA devices ▪ Available in Azure for real-time AI (inference) ▪ Configurable for different types of pre- trained deep neural networks (DNN) ▪ Image classification and recognition ▪ ResNet 50, ResNet 152, VGG-16, … ▪ High performance > 500 classifications / second ▪ Not for your custom models