SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
MDR Learning
Julien Simon
Global Evangelist, AI & Machine Learning, AWS
@julsimon
Machine Learning
Deep Learning
Reinforcement Learning
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Artificial Intelligence: design software applications which
exhibit human-like behavior, e.g. speech, natural language
processing, reasoning or intuition
Machine Learning: using statistical algorithms, teach
machines to learn from featurized data without being
explicitly programmed
Deep Learning: using neural networks, teach machines to
learn from complex data where features cannot be
explicitly expressed
First things first
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Supervised learning
• Run an algorithm on a labeled data set.
• The model learns how to correctly predict the right answer.
• Regression and classification are examples of supervised learning.
Unsupervised learning
• Run an algorithm on an unlabeled data set.
• The model learns patterns and organizes samples accordingly.
• Clustering and topic modeling are examples of unsupervised learning.
Types of Machine Learning
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://fr.slideshare.net/JulienSIMON5/an-introduction-to-machine-learning-with-scikitlearn-october-2018
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
http://scikit-learn.org/stable/tutorial/machine_learning_map/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://fr.slideshare.net/JulienSIMON5/an-introduction-to-deep-learning-84214689
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Activation functionsThe neuron
!
"#$
%
xi ∗ wi + b = u
”Multiply and
Accumulate”
Source: Wikipedia
bias
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
x =
x11, x12, …. x1I
x21, x22, …. x2I
… … …
xm1, xm2, …. xmI
I features
m samples
y =
2
0
…
4
m labels,
N2 categories
0,0,1,0,0,…,0
1,0,0,0,0,…,0
…
0,0,0,0,1,…,0
One-hot encoding
Neural networks
Buildingasimpleclassifier
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
x =
x11, x12, …. x1I
x21, x22, …. x2I
… … …
xm1, xm2, …. xmI
I features
m samples
y =
2
0
…
4
m labels,
N2 categories
Total number of predictions
Accuracy =
Number of correct predictions
0,0,1,0,0,…,0
1,0,0,0,0,…,0
…
0,0,0,0,1,…,0
One-hot encoding
Neural networks
Buildingasimpleclassifier
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Weights are initialized at random
à the initial network predicts at random
f(X1) = Y’1
A loss function measures the difference between
the real label Y1 and the predicted label Y’1
error = loss(Y1, Y’1)
For a batch of samples:
!
"#$
%&'() *"+,
loss(Yi, Y’i) = batch error
The purpose of the training process is to
minimize error by gradually adjusting weights.
Neural networks
Buildingasimpleclassifier
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Training a neural network
Training data set Training
Trained
neural network
Batch size
Learning rate
Number of epochs
Hyper parameters
Backpropagation
Forward propagation
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Building a dataset is not always an option
Large, complex problems
Uncertain, chaotic environments
Continuous learning
Supply chain management, HVAC systems, industrial robotics, autonomous vehicles,
portfolio management, oil exploration, etc.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Types of Machine Learning
Reinforcement learning
(RL)
Supervised learning
Unsupervised learning
AMOUNT OF TRAINING DATA REQUIRED
SOPHISTICATIONOFMLMODELS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Learning without any data: we’ve all done it!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reinforcement Learning
An agent interacts with its environment.
The agent receives positive or negative
rewards for its actions: rewards are
computed by a user-defined function
which outputs a numeric representation
of the actions that should be
incentivized.
By trying to maximize the accumulation
of rewards, the agent learns an optimal
strategy (aka policy) for decision making.
Source: Wikipedia
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Training a RL model
1. Formulate the problem: goal, environment, state, actions, reward
2. Define the environment: real-world or simulator?
3. Define the presets
4. Write the training code and the reward function
5. Train the model
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://github.com/awslabs/amazon-sagemaker-examples/tree/master/reinforcement_learning/rl_roboschool_ray
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The players
Simulation
environment
RL
agent
Initial
model
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
At first, the agent can’t even stand up
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Actions and observations
Simulation
environment
Actions
Observations
RL
agent
Initial
model
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The model learns through actions and observations
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Interactions generate training data
Simulation
environment
Actions
Observation
RL
agent
Training Data
Observation, action, reward
Training
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Training results in model updates
Simulation
environment
Actions
Observation
RL
agent
Model updates
Training data
Observation, action, reward
Training
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The agent learns to stand and step
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Multiple training episodes improve learning
Simulation
environment
Actions
Observation
RL
agent
Model updates
Training data
Observation, action, reward
Training
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Making progress
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RL agents try to maximize rewards
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Eventually, the model learns how to walk and run
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Evaluate and deploy trained models
Simulation
environment
Actions
Observation
Trained
Model
RL
agent
Model updates
Training data
Training
visualization
Observation, action, reward
Deploy Model
Training
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Robotics
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Financial portfolio management
Objective Maximize the value of a financial portfolio
STATE Current stock portfolio, price history
ACTION Buy, sell stocks
REWARD Positive when return is positive
Negative when return is negative
https://github.com/awslabs/amazon-sagemaker-
examples/tree/master/reinforcement_learning/rl_portfolio_management_coach_customEnv
Jiang, Zhengyao, Dixing Xu, and Jinjun Liang
« A deep reinforcement learning framework for the
financial portfolio management problem. »
arXiv:1706.10059 (2017)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Compressing deep learning models
Objective Compress model without losing accuracy
STATE Layers
ACTION Remove or shrink a layer
REWARD A combination of compression ratio and
accuracy.
https://github.com/awslabs/amazon-sagemaker-
examples/tree/master/reinforcement_learning/rl_network_compression_ray_custom
Ashok, Anubhav, Nicholas Rhinehart, Fares Beainy, and Kris M. Kitani
"N2N learning: network to network compression via policy gradient
reinforcement learning." arXiv:1709.06030 (2017).
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Vehicle routing
Objective Fulfill customer orders
STATE Current location, distance from homes
ACTION Accept, pick up, and deliver order
REWARD Positive when we deliver on time
Negative when we fail to deliver on time
https://github.com/awslabs/amazon-sagemaker-
examples/tree/master/reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Autonomous driving
AWS DeepRacer
1/18th scale autonomous vehicle
Amazon RoboMaker
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Getting started
http://aws.amazon.com/free
https://ml.aws
https://aws.amazon.com/sagemaker
https://github.com/awslabs/amazon-sagemaker-examples
https://aws.amazon.com/blogs/aws/amazon-sagemaker-rl-managed-reinforcement-
learning-with-amazon-sagemaker/
https://aws.amazon.com/deepracer/
https://medium.com/@julsimon
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://amzn.to/2mp1Lf5
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Julien Simon
Global Evangelist, AI & Machine Learning, AWS
@julsimon

Contenu connexe

Plus de Julien SIMON

AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)Julien SIMON
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...Julien SIMON
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)Julien SIMON
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Julien SIMON
 
Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Julien SIMON
 
The Future of AI (September 2019)
The Future of AI (September 2019)The Future of AI (September 2019)
The Future of AI (September 2019)Julien SIMON
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Julien SIMON
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Julien SIMON
 
Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Julien SIMON
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Julien SIMON
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Julien SIMON
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Julien SIMON
 
Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)
Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)
Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)Julien SIMON
 
Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)Julien SIMON
 
Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)Julien SIMON
 
Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)Julien SIMON
 
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...Julien SIMON
 
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)Julien SIMON
 
Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)Julien SIMON
 
Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)Julien SIMON
 

Plus de Julien SIMON (20)

AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)
 
Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)
 
The Future of AI (September 2019)
The Future of AI (September 2019)The Future of AI (September 2019)
The Future of AI (September 2019)
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
 
Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)
 
Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)
Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)
Build, train and deploy Machine Learning models on Amazon SageMaker (May 2019)
 
Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)Become a Machine Learning developer with AWS services (May 2019)
Become a Machine Learning developer with AWS services (May 2019)
 
Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)Scaling Machine Learning from zero to millions of users (May 2019)
Scaling Machine Learning from zero to millions of users (May 2019)
 
Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)Become a Machine Learning developer with AWS (Avril 2019)
Become a Machine Learning developer with AWS (Avril 2019)
 
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...Solve complex business problems with Amazon Personalize and Amazon Forecast (...
Solve complex business problems with Amazon Personalize and Amazon Forecast (...
 
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)Build, Train and Deploy Machine Learning Models at Scale (April 2019)
Build, Train and Deploy Machine Learning Models at Scale (April 2019)
 
Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)Optimize your Machine Learning workloads (April 2019)
Optimize your Machine Learning workloads (April 2019)
 
Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)Build Machine Learning Models with Amazon SageMaker (April 2019)
Build Machine Learning Models with Amazon SageMaker (April 2019)
 

Dernier

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Dernier (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

[ Meetup - Cloudreach - Paris - France - 19/09/2019]

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. MDR Learning Julien Simon Global Evangelist, AI & Machine Learning, AWS @julsimon Machine Learning Deep Learning Reinforcement Learning
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Artificial Intelligence: design software applications which exhibit human-like behavior, e.g. speech, natural language processing, reasoning or intuition Machine Learning: using statistical algorithms, teach machines to learn from featurized data without being explicitly programmed Deep Learning: using neural networks, teach machines to learn from complex data where features cannot be explicitly expressed First things first
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Supervised learning • Run an algorithm on a labeled data set. • The model learns how to correctly predict the right answer. • Regression and classification are examples of supervised learning. Unsupervised learning • Run an algorithm on an unlabeled data set. • The model learns patterns and organizes samples accordingly. • Clustering and topic modeling are examples of unsupervised learning. Types of Machine Learning
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://fr.slideshare.net/JulienSIMON5/an-introduction-to-machine-learning-with-scikitlearn-october-2018
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. http://scikit-learn.org/stable/tutorial/machine_learning_map/
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://fr.slideshare.net/JulienSIMON5/an-introduction-to-deep-learning-84214689
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Activation functionsThe neuron ! "#$ % xi ∗ wi + b = u ”Multiply and Accumulate” Source: Wikipedia bias
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. x = x11, x12, …. x1I x21, x22, …. x2I … … … xm1, xm2, …. xmI I features m samples y = 2 0 … 4 m labels, N2 categories 0,0,1,0,0,…,0 1,0,0,0,0,…,0 … 0,0,0,0,1,…,0 One-hot encoding Neural networks Buildingasimpleclassifier
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. x = x11, x12, …. x1I x21, x22, …. x2I … … … xm1, xm2, …. xmI I features m samples y = 2 0 … 4 m labels, N2 categories Total number of predictions Accuracy = Number of correct predictions 0,0,1,0,0,…,0 1,0,0,0,0,…,0 … 0,0,0,0,1,…,0 One-hot encoding Neural networks Buildingasimpleclassifier
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Weights are initialized at random à the initial network predicts at random f(X1) = Y’1 A loss function measures the difference between the real label Y1 and the predicted label Y’1 error = loss(Y1, Y’1) For a batch of samples: ! "#$ %&'() *"+, loss(Yi, Y’i) = batch error The purpose of the training process is to minimize error by gradually adjusting weights. Neural networks Buildingasimpleclassifier
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Training a neural network Training data set Training Trained neural network Batch size Learning rate Number of epochs Hyper parameters Backpropagation Forward propagation
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Building a dataset is not always an option Large, complex problems Uncertain, chaotic environments Continuous learning Supply chain management, HVAC systems, industrial robotics, autonomous vehicles, portfolio management, oil exploration, etc.
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Types of Machine Learning Reinforcement learning (RL) Supervised learning Unsupervised learning AMOUNT OF TRAINING DATA REQUIRED SOPHISTICATIONOFMLMODELS
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Learning without any data: we’ve all done it!
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Reinforcement Learning An agent interacts with its environment. The agent receives positive or negative rewards for its actions: rewards are computed by a user-defined function which outputs a numeric representation of the actions that should be incentivized. By trying to maximize the accumulation of rewards, the agent learns an optimal strategy (aka policy) for decision making. Source: Wikipedia
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Training a RL model 1. Formulate the problem: goal, environment, state, actions, reward 2. Define the environment: real-world or simulator? 3. Define the presets 4. Write the training code and the reward function 5. Train the model
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://github.com/awslabs/amazon-sagemaker-examples/tree/master/reinforcement_learning/rl_roboschool_ray
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. The players Simulation environment RL agent Initial model
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. At first, the agent can’t even stand up
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Actions and observations Simulation environment Actions Observations RL agent Initial model
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. The model learns through actions and observations
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Interactions generate training data Simulation environment Actions Observation RL agent Training Data Observation, action, reward Training
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Training results in model updates Simulation environment Actions Observation RL agent Model updates Training data Observation, action, reward Training
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. The agent learns to stand and step
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Multiple training episodes improve learning Simulation environment Actions Observation RL agent Model updates Training data Observation, action, reward Training
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Making progress
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. RL agents try to maximize rewards
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Eventually, the model learns how to walk and run
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Evaluate and deploy trained models Simulation environment Actions Observation Trained Model RL agent Model updates Training data Training visualization Observation, action, reward Deploy Model Training
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Robotics
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Financial portfolio management Objective Maximize the value of a financial portfolio STATE Current stock portfolio, price history ACTION Buy, sell stocks REWARD Positive when return is positive Negative when return is negative https://github.com/awslabs/amazon-sagemaker- examples/tree/master/reinforcement_learning/rl_portfolio_management_coach_customEnv Jiang, Zhengyao, Dixing Xu, and Jinjun Liang « A deep reinforcement learning framework for the financial portfolio management problem. » arXiv:1706.10059 (2017)
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Compressing deep learning models Objective Compress model without losing accuracy STATE Layers ACTION Remove or shrink a layer REWARD A combination of compression ratio and accuracy. https://github.com/awslabs/amazon-sagemaker- examples/tree/master/reinforcement_learning/rl_network_compression_ray_custom Ashok, Anubhav, Nicholas Rhinehart, Fares Beainy, and Kris M. Kitani "N2N learning: network to network compression via policy gradient reinforcement learning." arXiv:1709.06030 (2017).
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Vehicle routing Objective Fulfill customer orders STATE Current location, distance from homes ACTION Accept, pick up, and deliver order REWARD Positive when we deliver on time Negative when we fail to deliver on time https://github.com/awslabs/amazon-sagemaker- examples/tree/master/reinforcement_learning/rl_traveling_salesman_vehicle_routing_coach
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Autonomous driving AWS DeepRacer 1/18th scale autonomous vehicle Amazon RoboMaker
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Getting started http://aws.amazon.com/free https://ml.aws https://aws.amazon.com/sagemaker https://github.com/awslabs/amazon-sagemaker-examples https://aws.amazon.com/blogs/aws/amazon-sagemaker-rl-managed-reinforcement- learning-with-amazon-sagemaker/ https://aws.amazon.com/deepracer/ https://medium.com/@julsimon
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://amzn.to/2mp1Lf5
  • 39. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Julien Simon Global Evangelist, AI & Machine Learning, AWS @julsimon