Deep Learning con TensorFlow and Apache MXNet su Amazon SageMaker

Amazon Web Services
Amazon Web ServicesAmazon Web Services
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Deep Learning with TensorFlow and
Apache MXNet on Amazon SageMaker
Julien Simon
Global Evangelist, AI & Machine Learning
@julsimon
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark
M L F R A M E W O R K S &
I N F R A S T R U C T U R E
The Amazon ML Stack: Broadest & Deepest Set of Capabilities
A I S E R V I C E S
R E K O G N I T I O N
I M A G E
P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D
C O M P R E H E N D
M E D I C A L
L E XR E K O G N I T I O N
V I D E O
Vision Speech Chatbots
A M A Z O N S A G E M A K E R
B U I L D T R A I N
F O R E C A S TT E X T R A C T P E R S O N A L I Z E
D E P L O Y
Pre-built algorithms & notebooks
Data labeling (G R O U N D T R U T H )
One-click model training & tuning
Optimization ( N E O )
One-click deployment & hosting
M L S E R V I C E S
F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e
E C 2 P 3
& P 3 d n
E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C
I N F E R E N C E
Models without training data (REINFORCEMENT LEARNING)
Algorithms & models ( A W S M A R K E T P L A C E )
Language Forecasting Recommendations
NEW NEWNEW
NEW
NEW
NEWNEW
NEW
NEW
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark
M L F R A M E W O R K S &
I N F R A S T R U C T U R E
The Amazon ML Stack: Broadest & Deepest Set of Capabilities
A I S E R V I C E S
R E K O G N I T I O N
I M A G E
P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D
C O M P R E H E N D
M E D I C A L
L E XR E K O G N I T I O N
V I D E O
Vision Speech Chatbots
A M A Z O N S A G E M A K E R
B U I L D T R A I N
F O R E C A S TT E X T R A C T P E R S O N A L I Z E
D E P L O Y
Pre-built algorithms & notebooks
Data labeling (G R O U N D T R U T H )
One-click model training & tuning
Optimization ( N E O )
One-click deployment & hosting
M L S E R V I C E S
F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e
E C 2 P 3
& P 3 d n
E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C
I N F E R E N C E
Models without training data (REINFORCEMENT LEARNING)
Algorithms & models ( A W S M A R K E T P L A C E )
Language Forecasting Recommendations
NEW NEWNEW
NEW
NEW
NEWNEW
NEW
NEW
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS is framework agnostic
Choose from popular frameworks
Run them fully managed Or run them yourself
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker:
Build, Train, and Deploy ML Models at Scale
1
2
3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS Deep Learning AMIs
Preconfigured environments to build Deep Learning applications
Conda AMI
For developers who want pre-
installed pip packages of DL
frameworks in separate virtual
environments.
Base AMI
For developers who want a clean
slate to set up private DL engine
repositories or custom builds of
DL engines.
AMI with source code
For developers who want
preinstalled DL frameworks and
their source code in a shared
Python environment.
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
TensorFlow
• Open source software library for Machine Learning
• Main API in Python, experimental support for other languages
• Built-in support for many network architectures: FC, CNN, LSTM, etc.
• Support for symbolic execution, as well as imperative execution since v1.7
(aka “eager execution”)
• Complemented by the Keras high-level API
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS: The platform of choice to run TensorFlow
85% of all
TensorFlow
workloads in the
cloud runs on AWS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Training a ResNet-50 benchmark with the synthetic ImageNet dataset
using our optimized build of TensorFlow 1.11 on a c5.18xlarge instance
type is 11x faster than training on the stock binaries.
https://aws.amazon.com/about-aws/whats-new/2018/10/chainer4-4_theano_1-0-2_launch_deep_learning_ami/
October 2018
Optimizing TensorFlow for Amazon EC2 C5 instances
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Optimizing TensorFlow for Amazon EC2 P3 instances
65%
30m
90%
14m
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
TensorFlow on Amazon SageMaker: a first-class citizen
• Built-in containers for training and prediction.
• Code available on Github: https://github.com/aws/sagemaker-tensorflow-containers
• Build it, run it on your own machine, customize it, push it to Amazon ECR, etc.
• Supported versions: 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0
• Advanced features
• Local mode: train on the notebook instance for faster experimentation
• Script mode: use the same TensorFlow code as on your local machine (1.11.0 and up)
• Distributed training: zero setup!
• Pipe mode: stream large datasets directly from Amazon S3
• TensorBoard: visualize the progress of your training jobs
• Keras support (tf.keras.* and keras.*)
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Apache MXNet
• Open source software library for Deep Learning
• Natively implemented in C++
• Built-in support for many network architectures: FC, CNN, LSTM, etc.
• Symbolic API: Python, Scala, Clojure, R, Julia, Perl, Java (inference only)
• Imperative API: Gluon (Python), with computer vision and natural
language processing toolkits
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Apache MXNet: deep learning for enterprise developers
2x faster
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Apache MXNet on Amazon SageMaker: a first-class citizen
• Built-in containers for training and prediction.
• Code available on Github: https://github.com/aws/sagemaker-mxnet-container
• Build it, run it on your own machine, customize it, push it to Amazon ECR, etc.
• Supported versions: 0.12.1, 1.0.0, 1.1.0, 1.2.1, 1.3.0
• Advanced features
• Local mode: train on the notebook instance for faster experimentation
• Script mode: use the same TensorFlow as on your local machine
• Distributed training: zero setup!
• Pipe mode: stream large datasets directly from Amazon S3
• Keras support (tf.keras.* and keras.*)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
TRACK WAFFLE FRY FRESHNESS
Identify fries that have exceeded
the hold time
USES DEEP LEARNING
Computer vision model for object
detection and tracking
BUILT THE MODEL USING MXNet
A team of enterprise developers with
no ML expertise
Apache MXNet customer example: Chick-fil-A
https://www.youtube.com/watch?v=dKcyAjCtXqc
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Inference
(Prediction)
90%
Training
10%
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Hardware optimization is extremely complex
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon SageMaker Neo
Train once, run anywhere with 2x the performance
K E Y F E A T U R E S
Open-source Neo-AI runtime and compiler
under the Apache software license;
1/10th the size of original frameworks
github.com/neo-ai
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Are you making the most of your infrastructure?
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon Elastic Inference
Reduce deep learning inference costs up to 75%
K E Y F E A T U R E S
Integrated with
Amazon EC2 and
Amazon SageMaker
Support for TensorFlow
and Apache MXNet
Single and
mixed-precision
operations
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
© 2018, 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/aws/sagemaker-python-sdk
https://github.com/awslabs/amazon-sagemaker-examples
https://medium.com/@julsimon
https://gitlab.com/juliensimon/dlnotebooks
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Julien Simon
Global Evangelist, AI and Machine Learning
@julsimon
https://medium.com/julsimon
1 von 29

Más contenido relacionado

Was ist angesagt?(20)

Pensi di essere pronto per i microservizi?Pensi di essere pronto per i microservizi?
Pensi di essere pronto per i microservizi?
Amazon Web Services1.1K views

Similar a Deep Learning con TensorFlow and Apache MXNet su Amazon SageMaker(20)

Amazon SageMaker In Action Amazon SageMaker In Action
Amazon SageMaker In Action
Amazon Web Services3.2K views
MLops workshop AWSMLops workshop AWS
MLops workshop AWS
Gili Nachum647 views
Amazon SageMaker Deep Dive for BuildersAmazon SageMaker Deep Dive for Builders
Amazon SageMaker Deep Dive for Builders
Amazon Web Services1K views

Más de Amazon Web Services(20)

Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon Web Services2.8K views
Open banking as a serviceOpen banking as a service
Open banking as a service
Amazon Web Services7K views
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon Web Services3.1K views
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services2.4K views
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services1.4K views
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services1.4K views
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
Amazon Web Services887 views
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services2.7K views

Deep Learning con TensorFlow and Apache MXNet su Amazon SageMaker

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Deep Learning with TensorFlow and Apache MXNet on Amazon SageMaker Julien Simon Global Evangelist, AI & Machine Learning @julsimon
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark M L F R A M E W O R K S & I N F R A S T R U C T U R E The Amazon ML Stack: Broadest & Deepest Set of Capabilities A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D C O M P R E H E N D M E D I C A L L E XR E K O G N I T I O N V I D E O Vision Speech Chatbots A M A Z O N S A G E M A K E R B U I L D T R A I N F O R E C A S TT E X T R A C T P E R S O N A L I Z E D E P L O Y Pre-built algorithms & notebooks Data labeling (G R O U N D T R U T H ) One-click model training & tuning Optimization ( N E O ) One-click deployment & hosting M L S E R V I C E S F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e E C 2 P 3 & P 3 d n E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C I N F E R E N C E Models without training data (REINFORCEMENT LEARNING) Algorithms & models ( A W S M A R K E T P L A C E ) Language Forecasting Recommendations NEW NEWNEW NEW NEW NEWNEW NEW NEW
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Trademark M L F R A M E W O R K S & I N F R A S T R U C T U R E The Amazon ML Stack: Broadest & Deepest Set of Capabilities A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D C O M P R E H E N D M E D I C A L L E XR E K O G N I T I O N V I D E O Vision Speech Chatbots A M A Z O N S A G E M A K E R B U I L D T R A I N F O R E C A S TT E X T R A C T P E R S O N A L I Z E D E P L O Y Pre-built algorithms & notebooks Data labeling (G R O U N D T R U T H ) One-click model training & tuning Optimization ( N E O ) One-click deployment & hosting M L S E R V I C E S F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e E C 2 P 3 & P 3 d n E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C I N F E R E N C E Models without training data (REINFORCEMENT LEARNING) Algorithms & models ( A W S M A R K E T P L A C E ) Language Forecasting Recommendations NEW NEWNEW NEW NEW NEWNEW NEW NEW
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS is framework agnostic Choose from popular frameworks Run them fully managed Or run them yourself
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon SageMaker: Build, Train, and Deploy ML Models at Scale 1 2 3
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Deep Learning AMIs Preconfigured environments to build Deep Learning applications Conda AMI For developers who want pre- installed pip packages of DL frameworks in separate virtual environments. Base AMI For developers who want a clean slate to set up private DL engine repositories or custom builds of DL engines. AMI with source code For developers who want preinstalled DL frameworks and their source code in a shared Python environment.
  • 7. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T TensorFlow • Open source software library for Machine Learning • Main API in Python, experimental support for other languages • Built-in support for many network architectures: FC, CNN, LSTM, etc. • Support for symbolic execution, as well as imperative execution since v1.7 (aka “eager execution”) • Complemented by the Keras high-level API
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS: The platform of choice to run TensorFlow 85% of all TensorFlow workloads in the cloud runs on AWS
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Training a ResNet-50 benchmark with the synthetic ImageNet dataset using our optimized build of TensorFlow 1.11 on a c5.18xlarge instance type is 11x faster than training on the stock binaries. https://aws.amazon.com/about-aws/whats-new/2018/10/chainer4-4_theano_1-0-2_launch_deep_learning_ami/ October 2018 Optimizing TensorFlow for Amazon EC2 C5 instances
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Optimizing TensorFlow for Amazon EC2 P3 instances 65% 30m 90% 14m
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T TensorFlow on Amazon SageMaker: a first-class citizen • Built-in containers for training and prediction. • Code available on Github: https://github.com/aws/sagemaker-tensorflow-containers • Build it, run it on your own machine, customize it, push it to Amazon ECR, etc. • Supported versions: 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0 • Advanced features • Local mode: train on the notebook instance for faster experimentation • Script mode: use the same TensorFlow code as on your local machine (1.11.0 and up) • Distributed training: zero setup! • Pipe mode: stream large datasets directly from Amazon S3 • TensorBoard: visualize the progress of your training jobs • Keras support (tf.keras.* and keras.*)
  • 13. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 14. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Apache MXNet • Open source software library for Deep Learning • Natively implemented in C++ • Built-in support for many network architectures: FC, CNN, LSTM, etc. • Symbolic API: Python, Scala, Clojure, R, Julia, Perl, Java (inference only) • Imperative API: Gluon (Python), with computer vision and natural language processing toolkits
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Apache MXNet: deep learning for enterprise developers 2x faster
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Apache MXNet on Amazon SageMaker: a first-class citizen • Built-in containers for training and prediction. • Code available on Github: https://github.com/aws/sagemaker-mxnet-container • Build it, run it on your own machine, customize it, push it to Amazon ECR, etc. • Supported versions: 0.12.1, 1.0.0, 1.1.0, 1.2.1, 1.3.0 • Advanced features • Local mode: train on the notebook instance for faster experimentation • Script mode: use the same TensorFlow as on your local machine • Distributed training: zero setup! • Pipe mode: stream large datasets directly from Amazon S3 • Keras support (tf.keras.* and keras.*)
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T TRACK WAFFLE FRY FRESHNESS Identify fries that have exceeded the hold time USES DEEP LEARNING Computer vision model for object detection and tracking BUILT THE MODEL USING MXNet A team of enterprise developers with no ML expertise Apache MXNet customer example: Chick-fil-A https://www.youtube.com/watch?v=dKcyAjCtXqc
  • 19. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Inference (Prediction) 90% Training 10%
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Hardware optimization is extremely complex
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon SageMaker Neo Train once, run anywhere with 2x the performance K E Y F E A T U R E S Open-source Neo-AI runtime and compiler under the Apache software license; 1/10th the size of original frameworks github.com/neo-ai
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Are you making the most of your infrastructure?
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon Elastic Inference Reduce deep learning inference costs up to 75% K E Y F E A T U R E S Integrated with Amazon EC2 and Amazon SageMaker Support for TensorFlow and Apache MXNet Single and mixed-precision operations
  • 27. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T © 2018, 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/aws/sagemaker-python-sdk https://github.com/awslabs/amazon-sagemaker-examples https://medium.com/@julsimon https://gitlab.com/juliensimon/dlnotebooks
  • 29. Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Julien Simon Global Evangelist, AI and Machine Learning @julsimon https://medium.com/julsimon