Slide 1

Slide 1 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Adrian Hornsby Cloud Architecture Evangelist @ AWS @adhorn Build, train, and deploy machine learning models at scale

Slide 2

Slide 2 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What are we talking about? AI Machine Learning Deep Learning

Slide 3

Slide 3 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is a Deep Learning?

Slide 4

Slide 4 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Predicting the price of a house with humans Price City ZipCode Life Quality Parking Size # Room Accessibility Family Friendly

Slide 5

Slide 5 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Predicting the price of a house with neural network Price City ZipCode Life Quality Parking Size # Room Accessibility Family Friendly Input Output Discovered by the neural network

Slide 6

Slide 6 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning – Neural Networks Output Layer Input Layer Hidden Layers Many More…

Slide 7

Slide 7 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How do we ”build” Machine Learning models?

Slide 8

Slide 8 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning Training Dataset The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. Human-in-the-loop

Slide 9

Slide 9 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://ml4a.github.io/ml4a/neural_networks/ Deep Learning Training

Slide 10

Slide 10 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://ml4a.github.io/ml4a/neural_networks/ 784 x 10 + 10 x 10 = 7940 weights Deep Learning Training

Slide 11

Slide 11 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Learning = Minimizing the loss (error) function Backpropagation

Slide 12

Slide 12 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Early stopping Training accuracy Loss function Accuracy 100% Epochs Validation accuracy Loss Best epoch OVERFITTING « Deep Learning ultimately is about finding a minimum that generalizes well, with bonus points for finding one fast and reliably », Sebastian Ruder

Slide 13

Slide 13 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning is a Big Deal It’s able to do better than other ML and Humans

Slide 14

Slide 14 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://github.com/precedenceguo/mx-rcnn https://github.com/zhreshold/mxnet-yolo CNN: Object Detection

Slide 15

Slide 15 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CNN: Object Detection

Slide 16

Slide 16 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. FDA-approved medical imaging https://www.periscope.tv/AWSstartups/1vAGRgevBXRJl https://www.youtube.com/watch?v=WE81dncwnIc CNN: Object Segmentation

Slide 17

Slide 17 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CNN: Text Detection and Recognition https://github.com/Bartzi/stn-ocr

Slide 18

Slide 18 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LSTM: Long Short Term Memory Networks Oh I remember! https://github.com/awslabs/sockeye Amazon Polly

Slide 19

Slide 19 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Generative Adversarial Networks (GAN) The future at work (already) today Generating new ”celebrity” faces https://github.com/tkarras/progressive_growing_of_gans

Slide 20

Slide 20 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Wait! There’s more! Models can also generate text from text, text from images, text from video, images from text, sound from video, 3D models from 2D images, etc.

Slide 21

Slide 21 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Zoos • Full implementations of many state-of-the-art models reported in the academic literature. • Complete models, with scripts, pre-trained weights and instructions on how to build and fine tune these models.

Slide 22

Slide 22 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Say hello to Transfer Learning (hidden gem) • Initialise parameter with pre-trained model • Use pre-trained model as fixed feature extractor and build model based on feature. • Why? • It takes a long time and a lot of resources to train a neural network from scratch.

Slide 23

Slide 23 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://www.youtube.com/watch?v=qGotULKg8e0 • Over 10 million images from 300,000 hotels • Fine-tuned a pre-trained Convolutional Neural Network using 100,000 images • Hotel descriptions now automatically feature the best available images Expedia Ranking hotel images using deep learning https://news.developer.nvidia.com/expedia-ranking-hotel-images-with-deep-learning/

Slide 24

Slide 24 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ML is still too complicated for everyday developers Collect and prepare training data Choose and optimize your ML algorithm Set up and manage environments for training Train and tune model (trial and error) Deploy model in production Scale and manage the production environment

Slide 25

Slide 25 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker A fully-managed platform that provides a quick and easy way to get models from idea to production. https://aws.amazon.com/sagemaker/

Slide 26

Slide 26 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Brand is Pervasive Across the Enterprise Data Structure Naming Conventions Callable Units Sub-routines Functions Digital Signage Bulk Printing Electronic Statements Digital Certificates AD Forests Domains Branches Posters Statements Correspondence Promotions Websites Online Print Media Electronic Media Broadcast email Disclaimers Documents Presentations Spreadsheets Reports Layout Content Charts Electronic Messaging

Slide 29

Slide 29 text

1 789 549 8 582 3 391 10 040 10 109 Messaging Voice Documents Reports Forms Screens Removal of Barclays From Systems in South Africa (Overall) 99,99% 0,01% Complete In Progress 97,93% 2,07% 15,32% 15,32% 15,32% 15,32% 15,32% 15,21% 15,32% 4,56% 4,56% 4,56% 4,56% 4,56% 4,53% 4,56% 53,28% 53,28% 53,28% 53,25% 53,28% 52,88% 53,28% 26,83% 26,83% 26,83% 26,81% 26,83% 26,63% 26,83% Constant CIB CTO DIST FT RBB WIMI 15,32% 15,31% 15,32% 15,32% 4,40% 15,30% 15,32% 4,56% 4,56% 4,56% 4,56% 1,07% 4,42% 4,56% 53,28% 53,24% 53,28% 53,28% 12,26% 51,59% 53,28% 26,83% 26,81% 26,83% 26,83% 6,18% 25,98% 26,83% Constant CIB CTO DIST FT RBB WIMI Effort Required (External) Effort Required (Internal) Combined View Burndown [% of Total Outstanding] Analysis Effort Completed Design Effort Completed Development Effort Completed Deployment Completed (Live) Key Metrics 0,00% 100,00% Certification External Internal 100% 92% 77% 78% 78% 78% 76%79% 78% 82% 70%68% 72% 60% 59% 29% 30% 29%27% 25% 5% 1% 0% PGM External PGM Overall [##%] 39,074 Items (Total) 24,250 Collective Workdays 36 SA Business Units 293 Systems (SA Only) 442 Touchpoints (2x Touch)

Slide 30

Slide 30 text

Master Data Store Registry Master Data Rules Automated Analysis Messaging Generators S3 Analysis ODS Email Submission Manual Submission Crowdsourced Submission Images Logos Text Type Categorisation Item Deconstruction Submission Gateway (ETL & Manual) Sagemaker Analysis Brand Rules Learned Modelling Historic (Retired) Brand Elements Disallowed Brand Elements Approved Brand Elements Current Templates, Campaigns, etc Case Management Exceptions Logs Image Master Document Master Other Data Master Analytics Data Store À Archive 1 À Archive 2 À Archive …n Consolidate Match Enhance Reporting (Metrics) Reporting (Insights) BUR Data Engine (Inventory) Tableau

Slide 31

Slide 31 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 32

Slide 32 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building Machine Learning Models Create and manage cloud-based notebooks Use SageMaker‘s web interface to get started Or build models locally, then upload to SageMaker

Slide 33

Slide 33 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 34

Slide 34 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Training Zero setup Streaming datasets + distributed compute Hyperparameter optimization One-click training

Slide 35

Slide 35 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 36

Slide 36 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hosting One-click deployment Low latency, high throughput, and high reliability A/B testing Bring your own model

Slide 37

Slide 37 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 38

Slide 38 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SageMaker built-in algorithms XGBoost, FM, Linear, and Forecasting for supervised learning Kmeans, PCA, and Word2Vec for clustering and pre- processing Image classification with convolutional neural networks LDA and NTM for topic modeling, seq2seq for translation

Slide 39

Slide 39 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 40

Slide 40 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 41

Slide 41 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bring your own algorithm ... add algorithm code to a Docker container... Pick your preferred framework... ... publish your Docker image to ECR

Slide 42

Slide 42 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Workflow Amazon’s fast, scalable algorithms Distributed TensorFlow, Apache MXNet, Chainer, PyTorch Bring your own algorithm Hyperparameter Tuning Building Hosting Training

Slide 43

Slide 43 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hyperparameter Tuning (Automated Model Tuning) Run a large set of training jobs with varying hyperparameters... ... and search the hyperparameter space for improved accuracy.

Slide 44

Slide 44 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Pay as you go ML compute by the second starting at $0.0464/hr ML storage by the second at $0.14 per GB-month Data processed in notebooks and hosting at $0.016 per GB Free trial to get started quickly

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo Sentiment Analysis with SageMaker and MXNet https://github.com/lupesko/sentiment-analysis-with-sagemaker-mxnet

Slide 47

Slide 47 text

Thank you! https://aws.amazon.com/sagemaker https://github.com/awslabs/amazon-sagemaker-examples https://github.com/aws/sagemaker-python-sdk https://github.com/aws/sagemaker-spark https://medium.com/@julsimon https://youtube.com/juliensimonfr https://gitlab.com/juliensimon/dlnotebooks Adrian Hornsby Cloud Architecture Evangelist @ AWS @adhorn