Slide 1

Slide 1 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Getting started with Deep Learning using Amazon SageMaker Antje Barth Technical Evangelist AI and Machine Learning, AWS @anbarth

Slide 2

Slide 2 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved A little bit about me… Antje Barth, AWS Technical Evangelist AI/ML • Data Enthusiast • AI / ML / Deep Learning • Machine Learning on Kubernetes • Big Data • Ex: MapR, Cisco #CodeLikeAGirl

Slide 3

Slide 3 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Our mission at AWS Put machine learning in the hands of every developer

Slide 4

Slide 4 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved FRAMEWORKS INTERFACES INFRASTRUCTURE AI Services The AWS ML stack VISION SPEECH LANGUAGE CHATBOTS FORECASTING RECOMMENDATIONS ML Services ML Frameworks + Infrastructure A M A Z O N P O L L Y A M A Z O N T R A N S C R I B E A M A Z O N T R A N S L A T E A M A Z O N C O M P R E H E N D & A M A Z O N C O M P R E H E N D M E D I C A L A M A Z O N L E X A M A Z O N F O R E C A S T A M A Z O N R E K O G N I T I O N I M A G E A M A Z O N R E K O G N I T I O N V I D E O A M A Z O N T E X T R A C T A M A Z O N P E R S O N A L I Z E F P G A s E C 2 P 3 & P 3 D N E C 2 G 4 E C 2 C 5 A W S I N F E R E N T I A A W S I o T G R E E N G R A S S A M A Z O N E L A S T I C I N F E R E N C E A W S D L C O N T A I N E R S & A M I s A M A Z O N E L A S T I C K U B E R N E T E S S E R V I C E A M A Z O N E L A S T I C C O N T A I N E R S E R V I C E Amazon SageMaker Ground Truth Notebooks Algorithms + Marketplace Reinforcement Learning Training Optimization Deployment Hosting h t t p s : / / m l . a w s

Slide 5

Slide 5 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved FRAMEWORKS INTERFACES INFRASTRUCTURE AI Services VISION SPEECH LANGUAGE CHATBOTS FORECASTING RECOMMENDATIONS ML Services ML Frameworks + Infrastructure A M A Z O N P O L L Y A M A Z O N T R A N S C R I B E A M A Z O N T R A N S L A T E A M A Z O N C O M P R E H E N D & A M A Z O N C O M P R E H E N D M E D I C A L A M A Z O N L E X A M A Z O N F O R E C A S T A M A Z O N R E K O G N I T I O N I M A G E A M A Z O N R E K O G N I T I O N V I D E O A M A Z O N T E X T R A C T A M A Z O N P E R S O N A L I Z E F P G A s E C 2 P 3 & P 3 D N E C 2 G 4 E C 2 C 5 A W S I N F E R E N T I A A W S I o T G R E E N G R A S S A M A Z O N E L A S T I C I N F E R E N C E A W S D L C O N T A I N E R S & A M I s A M A Z O N E L A S T I C K U B E R N E T E S S E R V I C E A M A Z O N E L A S T I C C O N T A I N E R S E R V I C E Amazon SageMaker Ground Truth Notebooks Algorithms + Marketplace Reinforcement Learning Training Optimization Deployment Hosting The AWS ML stack h t t p s : / / m l . a w s

Slide 6

Slide 6 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS is framework agnostic Choose from popular frameworks Run them fully managed Or run them yourself

Slide 7

Slide 7 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon Machine Images pre-configured with deep learning frameworks and GPU/CPU drivers AWS Deep Learning AMIs AWS Deep Learning Containers Docker images pre-installed with deep learning frameworks https://aws.amazon.com/ machine- learning/containers http://aws.amazon.com/ machine-learning/amis AWS helps you build self-managed Machine Learning environments with DYI services

Slide 8

Slide 8 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved FRAMEWORKS INTERFACES INFRASTRUCTURE AI Services VISION SPEECH LANGUAGE CHATBOTS FORECASTING RECOMMENDATIONS ML Services ML Frameworks + Infrastructure A M A Z O N P O L L Y A M A Z O N T R A N S C R I B E A M A Z O N T R A N S L A T E A M A Z O N C O M P R E H E N D & A M A Z O N C O M P R E H E N D M E D I C A L A M A Z O N L E X A M A Z O N F O R E C A S T A M A Z O N R E K O G N I T I O N I M A G E A M A Z O N R E K O G N I T I O N V I D E O A M A Z O N T E X T R A C T A M A Z O N P E R S O N A L I Z E F P G A s E C 2 P 3 & P 3 D N E C 2 G 4 E C 2 C 5 A W S I N F E R E N T I A A W S I o T G R E E N G R A S S A M A Z O N E L A S T I C I N F E R E N C E A W S D L C O N T A I N E R S & A M I s A M A Z O N E L A S T I C K U B E R N E T E S S E R V I C E A M A Z O N E L A S T I C C O N T A I N E R S E R V I C E Amazon SageMaker Ground Truth Notebooks Algorithms + Marketplace Reinforcement Learning Training Optimization Deployment Hosting The AWS ML stack h t t p s : / / m l . a w s

Slide 9

Slide 9 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale 1 2 3

Slide 10

Slide 10 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved 1 2 3 Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 11

Slide 11 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 12

Slide 12 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 13

Slide 13 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 14

Slide 14 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 15

Slide 15 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 16

Slide 16 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

Slide 17

Slide 17 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Working with Amazon SageMaker

Slide 18

Slide 18 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Build your dataset Business Problem ML problem framing Data collection Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training

Slide 19

Slide 19 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Annotating data at scale is time-consuming and expensive

Slide 20

Slide 20 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker Ground Truth Build scalable and cost-effective labeling workflows K E Y F E A T U R E S Automatic labeling via machine learning Ready-made and custom workflows for image bounding box, segmentation, and text Integrated with Deep Learning algorithms in Amazon SageMaker Private and public human workforce

Slide 21

Slide 21 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Demo: Amazon SageMaker Ground Truth To see how labeled images can be easily used for training, please look at: https://github.com/awslabs/amazon-sagemaker- examples/tree/master/ground_truth_labeling_jobs

Slide 22

Slide 22 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Business Problem ML problem framing Data collection Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training Prepare your dataset for Machine Learning

Slide 23

Slide 23 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Business Problem ML problem framing Data collection Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training Build, train and deploy models using SageMaker

Slide 24

Slide 24 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Building models with Amazon SageMaker

Slide 25

Slide 25 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Notebook instances • Fully managed EC2 instances, from T2 to P3 - G4 and R5 now available for inference – NEW! • Pre-installed with Jupyter and Conda environments - Python 2.7 & 3.6 - Open-source libraries (TensorFlow, Apache MXNet, etc.) - Beta support for R – NEW! - Amazon Elastic Inference for cost-effective GPU acceleration • Lifecycle configurations • VPC, encryption, etc. • Get to work in minutes, zero setup

Slide 26

Slide 26 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved The Amazon SageMaker API Python SDK orchestrating all Amazon SageMaker activity - High-level objects for algorithm selection, training, deploying, automatic model tuning, etc. https://github.com/aws/sagemaker-python-sdk - Spark SDK (Python & Scala) https://github.com/aws/sagemaker-spark/tree/master/sagemaker-spark-sdk AWS SDK - Service-level APIs for scripting and automation - CLI: ‘aws sagemaker’ - Language SDKs: boto3, etc.

Slide 27

Slide 27 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Training data Model Hosting Helper code Inference code Ground Truth Client application Inference code Training code Inference request Inference response Inference endpoint Amazon S3 Amazon EFS Amazon FSx for Lustre Model artifacts Amazon S3 NEW! Training code Helper code Model Training (on demand or spot) NEW!

Slide 28

Slide 28 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Training code Factorization Machines Linear Learner Principal Component Analysis K-Means Clustering XGBoost And more Built-in Algorithms (17) No ML coding required No infrastructure work required Distributed training Bring Your Own Container Full control, run anything! R, C++, etc. No infrastructure work required Built-in Frameworks Bring your own code: Script mode Open-source containers No infrastructure work required Distributed training NEW! Model options

Slide 29

Slide 29 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Built-in algorithms orange: supervised, blue: unsupervised Linear Learner: regression, classification Image Classification: Deep Learning (ResNet) Factorization Machines: regression, classification, recommendation Object Detection (SSD): Deep Learning (VGG or ResNet) K-Nearest Neighbors: non-parametric regression and classification Neural Topic Model: topic modeling XGBoost: regression, classification, ranking https://github.com/dmlc/xgboost Latent Dirichlet Allocation: topic modeling (mostly) K-Means: clustering Blazing Text: GPU-based Word2Vec, and text classification Principal Component Analysis: dimensionality reduction Sequence to Sequence: machine translation, speech to text and more Random Cut Forest: anomaly detection DeepAR: time-series forecasting (RNN) Object2Vec: general-purpose embedding IP Insights: usage patterns for IP addresses Semantic Segmentation: Deep Learning

Slide 30

Slide 30 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Built-in frameworks: just add your code • Built-in containers for training and prediction • Open-source, e.g., https://github.com/aws/sagemaker-tensorflow-containers • Build them, run them on your own machine, customize them, etc. • Local mode: train and predict on your notebook instance, or on your local machine • Script mode: migrate existing code to SageMaker with minimal changes NEW!

Slide 31

Slide 31 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Training ResNet-50 with the ImageNet dataset using our optimized build of TensorFlow 1.11 on a c5.18xlarge instance type is designed to be 11x faster than training on the stock binaries TensorFlow on AWS C5 instances (Intel Skylake) 65% 90% P3 instances (NVIDIA V100)

Slide 32

Slide 32 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved https://gitlab.com/juliensimon/dlnotebooks/blob/master/keras/03-fashion-mnist- sagemaker/Fashion%20MNIST-SageMaker.ipynb Demo: Image classification with Keras/Tensorflow • train locally without Amazon SageMaker • train locally with Amazon SageMaker (’local mode’) • train on infrastructure managed by Amazon SageMaker

Slide 33

Slide 33 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Marketplace for Machine Learning

Slide 34

Slide 34 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Conclusion

Slide 35

Slide 35 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker Fully managed hosting with auto- scaling One-click deployment Pre-built notebooks for common problems Built-in, high- performance algorithms One-click training Hyperparameter optimization Build Train Deploy FREE TIER

Slide 36

Slide 36 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Getting started • https://aws.amazon.com/free • https://ml.aws • https://aws.amazon.com/sagemaker • https://github.com/aws/sagemaker-python-sdk • https://github.com/aws/sagemaker-spark • https://github.com/awslabs/amazon-sagemaker-examples

Slide 37

Slide 37 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved © 2019, Amazon Web Services, Inc. or its Affiliates. aws.com/ml Start building!

Slide 38

Slide 38 text

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Thank you! antje.official antje @anbarth Antje Barth