SlideShare a Scribd company logo
1 of 27
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
Workshop: Amazon SageMaker and Tensorflow
Amit Sharma
Principal Solutions Architect
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Agenda
• About
• Concepts & Tools
• Setup
• Notebooks
• Teardown
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
The AWS Machine Learning Stack
AI SERVICES
ML PLATFORMS
ML FRAMEWORKS
VISION
Rekognition
Video
Rekognition
SPEECH
TranscribePolly
LANGUAGE
ComprehendTranslate
CHATBOTS
Lex
AWS DeepLensAmazon SageMaker
TensorFlow MXNet PyTorch Caffe2 Chainer Horvod Gluon Keras
Mechanical Turk
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
About
Everything you need to know about this workshop
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Workshop Details
• Timeframe:
– Two hour hands-on workshop
• Scope:
– Easily building models
and operating TensorFlow
using Amazon SageMaker
• Outcome:
– You will have built five neural
networks within Amazon SageMaker
https://github.com/tensorflow/tensorflow
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Prerequisites
Required
• AWS Account
• Root account / privileged IAM user
– sufficient permission to run
Amazon SageMaker, access
Amazon S3
Not Required
• TensorFlow experience
• Amazon SageMaker experience
• Machine Learning experience
• Python experience
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Concepts and Tools
Everything you need to know for this workshop
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Artificial Neural Networks (ANN)
Artificial neural networks (ANNs) or connectionist systems are
computing systems vaguely inspired by the biological neural
networks that constitute animal brains. Such systems "learn" (i.e.
progressively improve performance on) tasks by considering examples,
generally without task-specific programming. For example, in image
recognition, they might learn to identify images that contain cats by
analyzing example images that have been manually labeled as "cat" or
"no cat" and using the results to identify cats in other images. They do
this without any a priori knowledge about cats, e.g., that they have fur,
tails, whiskers and cat-like faces. Instead, they evolve their own set of
relevant characteristics from the learning material that they process.
From https://en.wikipedia.org/wiki/Artificial_neural_network
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Artificial Neural Networks (ANN)
Artificial neural networks (ANNs) or connectionist systems are
computing systems vaguely inspired by the biological neural
networks that constitute animal brains. Such systems "learn" (i.e.
progressively improve performance on) tasks by considering examples,
generally without task-specific programming. For example, in image
recognition, they might learn to identify images that contain cats by
analyzing example images that have been manually labeled as "cat" or
"no cat" and using the results to identify cats in other images. They do
this without any a priori knowledge about cats, e.g., that they have fur,
tails, whiskers and cat-like faces. Instead, they evolve their own set of
relevant characteristics from the learning material that they process.
From https://en.wikipedia.org/wiki/Artificial_neural_network
TL;DR: transforms input to output
in a complex manner
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
TensorFlow
“TensorFlow is an open source software library for numerical
computation using data flow graphs. The graph nodes represent
mathematical operations, while the graph edges represent the
multidimensional data arrays (tensors) that flow between them. This
flexible architecture lets you deploy computation to one or more CPUs or
GPUs in a desktop, server, or mobile device without rewriting code.
TensorFlow also includes TensorBoard, a data visualization toolkit.”
- From official Tensorflow repo: https://github.com/tensorflow/tensorflow
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
TensorFlow
“TensorFlow is an open source software library for numerical
computation using data flow graphs. The graph nodes represent
mathematical operations, while the graph edges represent the
multidimensional data arrays (tensors) that flow between them. This
flexible architecture lets you deploy computation to one or more CPUs or
GPUs in a desktop, server, or mobile device without rewriting code.
TensorFlow also includes TensorBoard, a data visualization toolkit.”
- From official Tensorflow repo: https://github.com/tensorflow/tensorflow
TL;DR: a framework for creating
artificial neural networks
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon SageMaker
Amazon SageMaker is a fully-managed platform that enables developers
and data scientists to quickly and easily build, train, and deploy machine
learning models at any scale.
Amazon SageMaker removes all the barriers that typically slow down
developers who want to use machine learning.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
https://jupyter.org/
Amazon SageMaker Notebooks
• Programming environments for
ad-hoc data analysis
• Support for many languages
– Python2/3 most common
• Persistent artifact
– .ipynb format
• Can be run:
– managed Notebook Instance in
Amazon SageMaker
– self-hosted (Amazon EC2
instances, laptop, etc)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon SageMaker Jobs
• Tasks that train your neural networks with data
• Created via one line of code
– In Python SDK: instantiate TensorFlow object
• Executes training job
• Under the covers:
– AWS Batch
– Amazon EC2 instances
• Training outputs a model
– Amazon S3 output location
– model.tar.gz
.fi
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon SageMaker Endpoints
• Deploys your model for inference as an API endpoint
– Requires previously trained model.tar.gz
• Created via one line of code
– In Python: sagemaker.deploy() method
• Under the covers:
– Amazon EC2 instances
.fi
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Setup
Start your engines (ie. your Amazon SageMaker Notebook Instances)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Creating the Notebook Instance
• Login to AWS Console
• Region: US East (N. Virginia)
• Service: Amazon SageMaker
• Select: Notebook Instances
• Click: Create Notebook Instance
– Name: sf-loft-2018
– Instance type: ml.t2.medium
– Instance role: <select existing role> or <Create New Role>
– VPC: none
• Wait a few minutes, then Open the new notebook instance
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
From Notebook Instance
• Launch a Terminal session
• In the terminal, run the following (can copy from
https://amzn.to/2GelxDj)
$ git clone https://github.com/awslabs/amazon-sagemaker-examples/
$ mv ./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow* ./SageMaker
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Notebooks
The workshop exercises via prepared Jupyter Notebooks
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Sample TensorFlow Notebooks
1. tensorflow_iris_dnn_classifier_using_estimators
2. tensorflow_abalone_age_predictor_using_keras
3. tensorflow_abalone_age_predictor_using_layers
4. tensorflow_distributed_mnist
5. tensorflow_resnet_cifar10_with_tensorboard
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Example 1: Iris Dataset
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Example 2 & 3: Abalone Dataset
Feature Description
Length Length of abalone (in longest direction; in mm)
Diameter
Diameter of abalone (measurement perpendicular to
length; in mm)
Height Height of abalone (with its meat inside shell; in mm)
Whole Weight Weight of entire abalone (in grams)
Shucked Weight Weight of abalone meat only (in grams)
Viscera Weight Gut weight of abalone (in grams), after bleeding
Shell Weight Weight of dried abalone shell (in grams)
https://en.wikipedia.org/wiki/Abalone
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Example 4: MNIST dataset
• Dataset commonly used for
machine learning of character
recognition
• “Hello World” of NN frameworks
https://en.wikipedia.org/wiki/MNIST_database
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Example 5: CIFAR-10 dataset
• Dataset commonly used for
demonstrating machine learning in
image classification
• 60,000 32x32 color images in 10
different classes
• Classes represent airplanes, cars,
birds, cats, deer, dogs, frogs,
horses, ships, and trucks
https://en.wikipedia.org/wiki/CIFAR-10
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Teardown
Clean up your workshop resources
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Delete Me
• Delete all Amazon SageMaker resources, such as:
– Notebook Instances
– Models
– Endpoint Configurations
– Endpoints
• Delete all Amazon S3 buckets and files
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
aws.amazon.com/activate
Everything and Anything Startups
Need to Get Started on AWS

More Related Content

Similar to Build Deep Learning Applications with TensorFlow & SageMaker: Machine Learning Week San Francisco

Build Deep Learning Applications with TensorFlow and Amazon SageMaker
Build Deep Learning Applications with TensorFlow and Amazon SageMakerBuild Deep Learning Applications with TensorFlow and Amazon SageMaker
Build Deep Learning Applications with TensorFlow and Amazon SageMakerAmazon Web Services
 
Building Deep Learning Applications with TensorFlow and Amazon SageMaker
Building Deep Learning Applications with TensorFlow and Amazon SageMakerBuilding Deep Learning Applications with TensorFlow and Amazon SageMaker
Building Deep Learning Applications with TensorFlow and Amazon SageMakerAmazon Web Services
 
Workshop: Build Deep Learning Applications with TensorFlow and SageMaker
Workshop: Build Deep Learning Applications with TensorFlow and SageMakerWorkshop: Build Deep Learning Applications with TensorFlow and SageMaker
Workshop: Build Deep Learning Applications with TensorFlow and SageMakerAmazon Web Services
 
Introduction to Scalable Deep Learning on AWS with Apache MXNet
Introduction to Scalable Deep Learning on AWS with Apache MXNetIntroduction to Scalable Deep Learning on AWS with Apache MXNet
Introduction to Scalable Deep Learning on AWS with Apache MXNetAmazon Web Services
 
From Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMakerFrom Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMakerAmazon Web Services
 
Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências - MCL...
Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências -  MCL...Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências -  MCL...
Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências - MCL...Amazon Web Services
 
Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...
Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...
Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...Amazon Web Services
 
BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...
BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...
BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...Amazon Web Services
 
Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)Julien SIMON
 
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...Codiax
 
Simplify Machine Learning with the Deep Learning AMI | AWS Floor28
Simplify Machine Learning with the Deep Learning AMI | AWS Floor28Simplify Machine Learning with the Deep Learning AMI | AWS Floor28
Simplify Machine Learning with the Deep Learning AMI | AWS Floor28Amazon Web Services
 
Amazon AI/ML Overview
Amazon AI/ML OverviewAmazon AI/ML Overview
Amazon AI/ML OverviewBESPIN GLOBAL
 
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker WorkshopAWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker WorkshopJulien SIMON
 
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...Amazon Web Services
 
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...Amazon Web Services
 
Building a Recommender System Using Amazon SageMaker's Factorization Machine ...
Building a Recommender System Using Amazon SageMaker's Factorization Machine ...Building a Recommender System Using Amazon SageMaker's Factorization Machine ...
Building a Recommender System Using Amazon SageMaker's Factorization Machine ...Amazon Web Services
 
Deep Learning, Demystified
Deep Learning, DemystifiedDeep Learning, Demystified
Deep Learning, DemystifiedGabe Hollombe
 
Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...
Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...
Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...Amazon Web Services
 
AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...
AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...
AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...Amazon Web Services
 
Building the Organization of the Future: Leveraging AI & ML
Building the Organization of the Future: Leveraging AI & ML Building the Organization of the Future: Leveraging AI & ML
Building the Organization of the Future: Leveraging AI & ML Amazon Web Services
 

Similar to Build Deep Learning Applications with TensorFlow & SageMaker: Machine Learning Week San Francisco (20)

Build Deep Learning Applications with TensorFlow and Amazon SageMaker
Build Deep Learning Applications with TensorFlow and Amazon SageMakerBuild Deep Learning Applications with TensorFlow and Amazon SageMaker
Build Deep Learning Applications with TensorFlow and Amazon SageMaker
 
Building Deep Learning Applications with TensorFlow and Amazon SageMaker
Building Deep Learning Applications with TensorFlow and Amazon SageMakerBuilding Deep Learning Applications with TensorFlow and Amazon SageMaker
Building Deep Learning Applications with TensorFlow and Amazon SageMaker
 
Workshop: Build Deep Learning Applications with TensorFlow and SageMaker
Workshop: Build Deep Learning Applications with TensorFlow and SageMakerWorkshop: Build Deep Learning Applications with TensorFlow and SageMaker
Workshop: Build Deep Learning Applications with TensorFlow and SageMaker
 
Introduction to Scalable Deep Learning on AWS with Apache MXNet
Introduction to Scalable Deep Learning on AWS with Apache MXNetIntroduction to Scalable Deep Learning on AWS with Apache MXNet
Introduction to Scalable Deep Learning on AWS with Apache MXNet
 
From Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMakerFrom Notebook to production with Amazon SageMaker
From Notebook to production with Amazon SageMaker
 
Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências - MCL...
Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências -  MCL...Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências -  MCL...
Machine Learning e Amazon SageMaker: Algoritmos, Modelos e Inferências - MCL...
 
Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...
Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...
Get Started with Deep Learning and Computer Vision Using AWS DeepLens (AIM316...
 
BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...
BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...
BDA301 Working with Machine Learning in Amazon SageMaker: Algorithms, Models,...
 
Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)Amazon SageMaker (December 2018)
Amazon SageMaker (December 2018)
 
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
 
Simplify Machine Learning with the Deep Learning AMI | AWS Floor28
Simplify Machine Learning with the Deep Learning AMI | AWS Floor28Simplify Machine Learning with the Deep Learning AMI | AWS Floor28
Simplify Machine Learning with the Deep Learning AMI | AWS Floor28
 
Amazon AI/ML Overview
Amazon AI/ML OverviewAmazon AI/ML Overview
Amazon AI/ML Overview
 
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker WorkshopAWS re:Invent 2018 - ENT321 - SageMaker Workshop
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
 
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
Build, Train, and Deploy Machine Learning for the Enterprise with Amazon Sage...
 
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
 
Building a Recommender System Using Amazon SageMaker's Factorization Machine ...
Building a Recommender System Using Amazon SageMaker's Factorization Machine ...Building a Recommender System Using Amazon SageMaker's Factorization Machine ...
Building a Recommender System Using Amazon SageMaker's Factorization Machine ...
 
Deep Learning, Demystified
Deep Learning, DemystifiedDeep Learning, Demystified
Deep Learning, Demystified
 
Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...
Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...
Deep Learning Demystified - A (Mostly) Effortless Introduction: AWS Developer...
 
AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...
AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...
AWS DeepLens Workshop: Building Computer Vision Applications - BDA201 - Anahe...
 
Building the Organization of the Future: Leveraging AI & ML
Building the Organization of the Future: Leveraging AI & ML Building the Organization of the Future: Leveraging AI & ML
Building the Organization of the Future: Leveraging AI & ML
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Build Deep Learning Applications with TensorFlow & SageMaker: Machine Learning Week San Francisco

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft Workshop: Amazon SageMaker and Tensorflow Amit Sharma Principal Solutions Architect
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Agenda • About • Concepts & Tools • Setup • Notebooks • Teardown
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved The AWS Machine Learning Stack AI SERVICES ML PLATFORMS ML FRAMEWORKS VISION Rekognition Video Rekognition SPEECH TranscribePolly LANGUAGE ComprehendTranslate CHATBOTS Lex AWS DeepLensAmazon SageMaker TensorFlow MXNet PyTorch Caffe2 Chainer Horvod Gluon Keras Mechanical Turk
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved About Everything you need to know about this workshop
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Workshop Details • Timeframe: – Two hour hands-on workshop • Scope: – Easily building models and operating TensorFlow using Amazon SageMaker • Outcome: – You will have built five neural networks within Amazon SageMaker https://github.com/tensorflow/tensorflow
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Prerequisites Required • AWS Account • Root account / privileged IAM user – sufficient permission to run Amazon SageMaker, access Amazon S3 Not Required • TensorFlow experience • Amazon SageMaker experience • Machine Learning experience • Python experience
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Concepts and Tools Everything you need to know for this workshop
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Artificial Neural Networks (ANN) Artificial neural networks (ANNs) or connectionist systems are computing systems vaguely inspired by the biological neural networks that constitute animal brains. Such systems "learn" (i.e. progressively improve performance on) tasks by considering examples, generally without task-specific programming. For example, in image recognition, they might learn to identify images that contain cats by analyzing example images that have been manually labeled as "cat" or "no cat" and using the results to identify cats in other images. They do this without any a priori knowledge about cats, e.g., that they have fur, tails, whiskers and cat-like faces. Instead, they evolve their own set of relevant characteristics from the learning material that they process. From https://en.wikipedia.org/wiki/Artificial_neural_network
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Artificial Neural Networks (ANN) Artificial neural networks (ANNs) or connectionist systems are computing systems vaguely inspired by the biological neural networks that constitute animal brains. Such systems "learn" (i.e. progressively improve performance on) tasks by considering examples, generally without task-specific programming. For example, in image recognition, they might learn to identify images that contain cats by analyzing example images that have been manually labeled as "cat" or "no cat" and using the results to identify cats in other images. They do this without any a priori knowledge about cats, e.g., that they have fur, tails, whiskers and cat-like faces. Instead, they evolve their own set of relevant characteristics from the learning material that they process. From https://en.wikipedia.org/wiki/Artificial_neural_network TL;DR: transforms input to output in a complex manner
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved TensorFlow “TensorFlow is an open source software library for numerical computation using data flow graphs. The graph nodes represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) that flow between them. This flexible architecture lets you deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device without rewriting code. TensorFlow also includes TensorBoard, a data visualization toolkit.” - From official Tensorflow repo: https://github.com/tensorflow/tensorflow
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved TensorFlow “TensorFlow is an open source software library for numerical computation using data flow graphs. The graph nodes represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) that flow between them. This flexible architecture lets you deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device without rewriting code. TensorFlow also includes TensorBoard, a data visualization toolkit.” - From official Tensorflow repo: https://github.com/tensorflow/tensorflow TL;DR: a framework for creating artificial neural networks
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker Amazon SageMaker is a fully-managed platform that enables developers and data scientists to quickly and easily build, train, and deploy machine learning models at any scale. Amazon SageMaker removes all the barriers that typically slow down developers who want to use machine learning.
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved https://jupyter.org/ Amazon SageMaker Notebooks • Programming environments for ad-hoc data analysis • Support for many languages – Python2/3 most common • Persistent artifact – .ipynb format • Can be run: – managed Notebook Instance in Amazon SageMaker – self-hosted (Amazon EC2 instances, laptop, etc)
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker Jobs • Tasks that train your neural networks with data • Created via one line of code – In Python SDK: instantiate TensorFlow object • Executes training job • Under the covers: – AWS Batch – Amazon EC2 instances • Training outputs a model – Amazon S3 output location – model.tar.gz .fi
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon SageMaker Endpoints • Deploys your model for inference as an API endpoint – Requires previously trained model.tar.gz • Created via one line of code – In Python: sagemaker.deploy() method • Under the covers: – Amazon EC2 instances .fi
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Setup Start your engines (ie. your Amazon SageMaker Notebook Instances)
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Creating the Notebook Instance • Login to AWS Console • Region: US East (N. Virginia) • Service: Amazon SageMaker • Select: Notebook Instances • Click: Create Notebook Instance – Name: sf-loft-2018 – Instance type: ml.t2.medium – Instance role: <select existing role> or <Create New Role> – VPC: none • Wait a few minutes, then Open the new notebook instance
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved From Notebook Instance • Launch a Terminal session • In the terminal, run the following (can copy from https://amzn.to/2GelxDj) $ git clone https://github.com/awslabs/amazon-sagemaker-examples/ $ mv ./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow* ./SageMaker
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Notebooks The workshop exercises via prepared Jupyter Notebooks
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Sample TensorFlow Notebooks 1. tensorflow_iris_dnn_classifier_using_estimators 2. tensorflow_abalone_age_predictor_using_keras 3. tensorflow_abalone_age_predictor_using_layers 4. tensorflow_distributed_mnist 5. tensorflow_resnet_cifar10_with_tensorboard
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example 1: Iris Dataset
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example 2 & 3: Abalone Dataset Feature Description Length Length of abalone (in longest direction; in mm) Diameter Diameter of abalone (measurement perpendicular to length; in mm) Height Height of abalone (with its meat inside shell; in mm) Whole Weight Weight of entire abalone (in grams) Shucked Weight Weight of abalone meat only (in grams) Viscera Weight Gut weight of abalone (in grams), after bleeding Shell Weight Weight of dried abalone shell (in grams) https://en.wikipedia.org/wiki/Abalone
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example 4: MNIST dataset • Dataset commonly used for machine learning of character recognition • “Hello World” of NN frameworks https://en.wikipedia.org/wiki/MNIST_database
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example 5: CIFAR-10 dataset • Dataset commonly used for demonstrating machine learning in image classification • 60,000 32x32 color images in 10 different classes • Classes represent airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks https://en.wikipedia.org/wiki/CIFAR-10
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Teardown Clean up your workshop resources
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Delete Me • Delete all Amazon SageMaker resources, such as: – Notebook Instances – Models – Endpoint Configurations – Endpoints • Delete all Amazon S3 buckets and files
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft aws.amazon.com/activate Everything and Anything Startups Need to Get Started on AWS