SlideShare a Scribd company logo
1 of 79
Download to read offline
 https://github.com/Microsoft/CNTK
Caffe Cognitive Toolkit MxNet TensorFlow Torch
FCN5 (1024) 55.329ms 51.038ms 60.448ms 62.044ms 52.154ms
AlexNet (256) 36.815ms 27.215ms 28.994ms 103.960ms 37.462ms
ResNet (32) 143.987ms 81.470ms 84.545ms 181.404ms 90.935ms
LSTM (256)
(v7 benchmark)
- 43.581ms
(44.917ms)
288.142ms
(284.898ms)
-
(223.547ms)
1130.606ms
(906.958ms)
http://dlbench.comp.hkbu.edu.hk/
Benchmarking by HKBU, Version 8
Single Tesla K80 GPU, CUDA: 8.0 CUDNN: v5.1
Caffe: 1.0rc5(39f28e4)
CNTK: 2.0 Beta10(1ae666d)
MXNet: 0.93(32dc3a2)
TensorFlow: 1.0(4ac9c09)
Torch: 7(748f5e3)
2 only supports 1 GPU
Achieved with 1-bit gradient quantization
algorithm
0
10000
20000
30000
40000
50000
60000
70000
80000
1 2 3 4 5
speed comparison (samples/second), higher = better
[note: December 2015]
Series1 Series2 Series3
MICROSOFT COGNITIVE TOOLKIT
First Deep Learning Framework Fully Optimized for Pascal
78
2,400
3,500
7,600
13,000
0
2,000
4,000
6,000
8,000
10,000
12,000
14,000
1 2 3 4 5
Toolkit Delivering Near-Linear Multi-GPU Scaling
AlexNet Performance
images/sec
AlexNet training batch size 128, Grad Bit = 32, Dual socket E5-2699v4 CPUs (total 44 cores)
CNTK 2.0b3 (to be released) includes cuDNN 5.1.8, NCCL 1.6.1, NVLink enabled
170x Faster
v. CPU Server
$ pip install <url>
https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-CNTK-on-your-machine
https://notebooks.azure.com/cntk/libraries/tutorials
Example: 2-hidden layer feed-forward NN
h1 = s(W1 x + b1) h1 = sigmoid (x @ W1 + b1)
h2 = s(W2 h1 + b2) h2 = sigmoid (h1 @ W2 + b2)
P = softmax(Wout h2 + bout) P = softmax (h2 @ Wout + bout)
with input x  RM
and one-hot label L  RM
and cross-entropy training criterion
ce = LT
log P ce = cross_entropy (L, P)
Scorpusce = max
Example: 2-hidden layer feed-forward NN
h1 = s(W1 x + b1) h1 = sigmoid (x @ W1 + b1)
h2 = s(W2 h1 + b2) h2 = sigmoid (h1 @ W2 + b2)
P = softmax(Wout h2 + bout) P = softmax (h2 @ Wout + bout)
with input x  RM
and one-hot label y  RJ
and cross-entropy training criterion
ce = yT
log P ce = cross_entropy (L, P)
Scorpusce = max
example: 2-hidden layer feed-forward NN
h1 = s(W1 x + b1) h1 = sigmoid (x @ W1 + b1)
h2 = s(W2 h1 + b2) h2 = sigmoid (h1 @ W2 + b2)
P = softmax(Wout h2 + bout) P = softmax (h2 @ Wout + bout)
with input x  RM
and one-hot label y  RJ
and cross-entropy training criterion
ce = yT
log P ce = cross_entropy (P, y)
Scorpusce = max
h1 = sigmoid (x @ W1 + b1)
h2 = sigmoid (h1 @ W2 + b2)
P = softmax (h2 @ Wout + bout)
ce = cross_entropy (P, y)
•
+
s
•
+
s
•
+
softmax
W1
b1
W2
b2
Wout
bout
cross_entropy
h1
h2
P
x y
h1 = sigmoid (x @ W1 + b1)
h2 = sigmoid (h1 @ W2 + b2)
P = softmax (h2 @ Wout + bout)
ce = cross_entropy (P, y)
ce
•
+
s
•
+
s
•
+
softmax
W1
b1
W2
b2
Wout
bout
cross_entropy
h1
h2
P
x y
ce
LEGO-like composability allows CNTK to support
wide range of networks & applications
Script configure and executes through CNTK Python APIs…
trainer
• SGD
(momentum,
Adam, …)
• minibatching
reader
• minibatch source
• task-specific
deserializer
• automatic
randomization
• distributed
reading
corpus model
network
• model function
• criterion function
• CPU/GPU
execution engine
• packing, padding
from cntk import *
# reader
def create_reader(path, is_training):
...
# network
def create_model_function():
...
def create_criterion_function(model):
...
# trainer (and evaluator)
def train(reader, model):
...
def evaluate(reader, model):
...
# main function
model = create_model_function()
reader = create_reader(..., is_training=True)
train(reader, model)
reader = create_reader(..., is_training=False)
evaluate(reader, model)
def create_reader(map_file, mean_file, is_training):
# image preprocessing pipeline
transforms = [
ImageDeserializer.crop(crop_type='Random', ratio=0.8, jitter_type='uniRatio')
ImageDeserializer.scale(width=image_width, height=image_height,
channels=num_channels,
interpolations='linear'),
ImageDeserializer.mean(mean_file)
]
# deserializer
return MinibatchSource(ImageDeserializer(map_file, StreamDefs(
features = StreamDef(field='image', transforms=transforms), '
labels = StreamDef(field='label', shape=num_classes)
)), randomize=is_training, epoch_size = INFINITELY_REPEAT if is_training else
FULL_DATA_SWEEP)
def create_reader(map_file, mean_file, is_training):
# image preprocessing pipeline
transforms = [
ImageDeserializer.crop(crop_type='Random', ratio=0.8, jitter_type='uniRatio')
ImageDeserializer.scale(width=image_width, height=image_height,
channels=num_channels,
interpolations='linear'),
ImageDeserializer.mean(mean_file)
]
# deserializer
return MinibatchSource(ImageDeserializer(map_file, StreamDefs(
features = StreamDef(field='image', transforms=transforms), '
labels = StreamDef(field='label', shape=num_classes)
)), randomize=is_training, epoch_size = INFINITELY_REPEAT if is_training else
FULL_DATA_SWEEP)
Model
z = model(x):
h1 = Dense(400, act = relu)(x)
h2 = Dense(200, act = relu)(h1)
r = Dense(10, act = None)(h2)
return r
Loss
cross_entropy_with_softmax(z,Y)
28 pix
28pix
Model
z = model(x):
h = Convolution2D((5,5),filt=8, …)(x)
h = MaxPooling(…)(h)
h = Convolution2D ((5,5),filt=16, …)((h)
h = MaxPooling(…)(h)
r = Dense(output_classes, act= None)(h)
return r
Problem: Tagging entities in Air Traffic Controller (ATIS) data
Rec
show
o
Rec
burbank
From_city
Rec
to
o
Rec
seattle
To_city
Rec
flights
o
Rec
tomorrow
Date
http://karpathy.github.io/2015/05/21/rnn-effectiveness/
0 0 1 0
Ԧ𝑥(t)
E
i = 943
O= 150
L
i = 150
O= 300
D
i = 300
O= 129
a =
sigmoid
ℎ(t-1) ℎ(t)
Ԧ𝑦(t)
Ԧ𝑥(t)
0 0 1 0
Text token
L
E
Ԧ𝑦(t)Class label
D
1 x 943
z = model():
return
Sequential([
Embedding(emb_dim=150),
Recurrence(LSTM(hidden_dim=300),
go_backwards=False),
Dense(num_labels = 129)
])
lr_schedule = C.learning_rate_schedule([0.05]*3 + [0.025]*2 + [0.0125],
C.UnitType.minibatch, epoch_size=100)
sgd_learner = C.sgd(z.parameters, lr_schedule)
ATIS
Train
96samples
(mini-batch)
.
.
.
.
#1
#2
#3
#96
Input feature ( 96 x Ԧ𝑥(t))
z = model():
return
Sequential([
Embedding(emb_dim=150),
Recurrence(LSTM(hidden_dim=300),
go_backwards=False),
Dense(num_labels = 129)
])
Loss cross_entropy_with_softmax(z,Y)
Trainer(model, (loss, error), learner)
Trainer.train_minibatch({X, Y})
Error classification_error(z,Y)
Choose a learner
(SGD, Adam, adagrad etc.)
One-hot
encoded
Label
(Y: 96 x
129/sample
Or word in
sequence)
t23t1
t1
t1
t1
t15
t9
t12
Function z = CNTKLib.Times(weightParam, input) + biasParam;
Function loss = CNTKLib.CrossEntropyWithSoftmax(z, labelVariable);
Function conv = CNTKLib.Pooling(CNTKLib.Convolution(convParam, input),
PoolingType.Average, poolingWindowShape);
Function resNetNode = CNTKLib.ReLU(CNTKLib.Plus(conv, input));
var parameterLearners = new List<Learner>() {
Learner.AdamLearner(classifierOutput.Parameters(), learningRate, momentum) };
var trainer = Trainer.CreateTrainer(classifierOutput, trainingLoss, prediction,
parameterLearners);
Function conv = CNTKLib.ReLU(CNTKLib.Convolution(convParams, features, strides ));
Function pooling = CNTKLib.Pooling(conv, PoolingType.Max, poolingWindow, stride, padding);
Function classifier = TestHelper.Dense(pooling, numClasses, device, Activation.None);
var minibatchSource =
MinibatchSource.TextFormatMinibatchSource("Train_cntk_text.txt"),
streamConfigurations, MinibatchSource.InfinitelyRepeat);
var minibatchData = minibatchSource.GetNextMinibatch(minibatchSize, device);
var arguments = new Dictionary<Variable, MinibatchData> {
{ input, minibatchData[featureStreamInfo] },
{ labels, minibatchData[labelStreamInfo] }
};
trainer.TrainMinibatch(arguments, device);
https://github.com/Microsoft/CNTK/tree/master/Examples/TrainingCShar
p
Accelerating adoption of AI by developers
(consuming models)
Rise of hybrid training and scoring scenarios
Push scoring/inference to the event (edge,
cloud, on-prem)
Some developers moving into deep learning as
non-traditional path to DS / AI dev
Growth of diverse hardware arms race across all
form factors (CPU / GPU / FPGA / ASIC /
device)
Data prep
Model deployment &
management
Model lineage & auditing
Explain-ability
D ATA S C I E N C E & A I
C H A L L E N G E SK E Y T R E N D S
Challenge
• Traditional power line inspection services are
costly
• Demand for low cost image scoring and support
for multiple concurrent customers
• Needed powerful AI to execute on a drone
solution
Solution
• Deep learning to analyze multiple streaming data
feeds
• Azure GPUs support Single Shot multibox
detectors
• Reliable, consistent, and highly elastic scalability
with Azure Batch Shipyards
Drone-based electric grid
inspector powered by
deep learning
snow
leopard?
Deep neural network Spark ML classifier
Decision tree or logistic
regression
Image featuresImage
Class 1 Class 1
Gap
Identifying Snow Leopards
Computer vision and classification on Spark
Apps + insights
Social
LOB
Graph
IoT
Image
CRM INGEST STORE PREP & TRAIN MODEL & SERVE
Data orchestration
and monitoring
Data lake
and storage
Hadoop/Spark/SQL
and ML
.
IoT
Azure Machine Learning
T H E A I D E V E L O P M E N T L I F E C Y C L E
Azure Machine Learning Studio
Platform for data scientists to graphically
build and deploy experiments
• Rapid experiment composition
• > 100 easily configured modules for
data prep, training, evaluation
• Extensibility through R & Python
• Serverless training and deployment
Some numbers:
• 100’s of thousands of deployed models
serving billions of requests
Begin building now with the
tools and platforms you know
Build, deploy, and
manage models at
scale
Boost productivity with
agile development
Notebooks
IDEs
Azure Machine Learning
Workbench
VS Code Tools for AI
N E W C A PA B I L I T I E S
Experimentation and
Model Management
Services
AZURE MACHINE
LEARNING SERVICES
Spark
SQL Server
Virtual
machines
GPUs
Container
services
SQL Server
Machine Learning
Server
ON-PREMISES
EDGE
Azure IoT Edge
TRAIN & DEPLOY
OPTIONS
AZURE
Local machine
Scale up to DSVM
Scale out with Spark on HDInsight
Azure Batch AI (Coming Soon)
ML Server
Experiment Everywhere
A ZURE ML
EXPERIMENTATION
Command line tools
IDEs
Notebooks in Workbench
VS Code Tools for AI
Manage project dependencies
Manage training jobs locally, scaled-up or
scaled-out
Git based checkpointing and version control
Service side capture of run metrics, output logs
and models
Use your favorite IDE, and any framework
Experimentation service
U S E T H E M O S T P O P U L A R I N N O VAT I O N S
U S E A N Y TO O L
U S E A N Y F R A M E W O R K O R L I B R A R Y
DOCKER
Single node deployment
(cloud/on-prem)
Azure Container Service
Azure IoT Edge
Microsoft ML Server
Spark clusters
SQL Server
Deploy Everywhere
A ZURE ML
MODEL MANAGEMENT
Deployment and management of models as HTTP
services
Container-based hosting of real time and batch
processing
Management and monitoring through Azure
Application Insights
First class support for SparkML, Python, Cognitive
Toolkit, TF, R, extensible to support others (Caffe,
MXnet)
Service authoring in Python
Manage models
AI Powered Spreadsheets
VS Code extension with deep integration to Azure
ML
End to end development environment, from new
project through training
Support for remote training
Job management
On top of all of the goodness of VS Code
(Python, Jupyter, Git, etc)
VS Code Tools for AI
Windows and Mac based
companion for AI development
Full environment set up (Python,
Jupyter, etc)
Embedded notebooks
Run History and Comparison
experience
New data wrangling tools
Azure Machine Learning
Workbench - What Is It?
AI Powered Data Wrangling
Rapidly sample, understand, and
prep data
Leverage PROSE and more for
intelligent, data prep by example
Extend/customize transforms and
featurization through Python
Generate Python and Pyspark for
execution at scale
Machine Learning & AI Portfolio
When to use what?
What engine(s) do you want
to use?
Deployment target
Which experience do you
want?
Build your own or consume pre-
trained models?
Microsoft
ML & AI
products
Build your
own
Azure Machine Learning
Code first
(On-prem)
ML Server
On-
prem
Hadoop
SQL
Server
(cloud)
AML services (Preview)
SQL
Server
Spark Hadoop Azure
Batch
DSVM Azure
Container
Service
Visual tooling
(cloud)
AML Studio
Consume
Cognitive services, bots
http://aka.ms/aml_deep_dive
https://aischool.microsoft.com/learning-paths/SPYpcLhRMyEAa2maw6YoU
https://channel9.msdn.com/events/Ignite/Microsoft-Ignite-Orlando-2017/BRK4033
https://channel9.msdn.com/events/Ignite/Microsoft-Ignite-Orlando-2017/BRK2270
https://www.microsoft.com/en-us/cognitive-toolkit/
https://azure.microsoft.com/services/machine-learning-services/
https://azure.microsoft.com/services/virtual-machines/data-science-virtual-machines/
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning Services

More Related Content

What's hot

Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...
Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...
Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...
Databricks
 
Automated Data Exploration: Building efficient analysis pipelines with Dask
Automated Data Exploration: Building efficient analysis pipelines with DaskAutomated Data Exploration: Building efficient analysis pipelines with Dask
Automated Data Exploration: Building efficient analysis pipelines with Dask
ASI Data Science
 
Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017
Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017
Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017
MLconf
 

What's hot (20)

Kaz Sato, Evangelist, Google at MLconf ATL 2016
Kaz Sato, Evangelist, Google at MLconf ATL 2016Kaz Sato, Evangelist, Google at MLconf ATL 2016
Kaz Sato, Evangelist, Google at MLconf ATL 2016
 
What’s New in the Berkeley Data Analytics Stack
What’s New in the Berkeley Data Analytics StackWhat’s New in the Berkeley Data Analytics Stack
What’s New in the Berkeley Data Analytics Stack
 
Tensorflow 101 @ Machine Learning Innovation Summit SF June 6, 2017
Tensorflow 101 @ Machine Learning Innovation Summit SF June 6, 2017Tensorflow 101 @ Machine Learning Innovation Summit SF June 6, 2017
Tensorflow 101 @ Machine Learning Innovation Summit SF June 6, 2017
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
 
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander UlanovA Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
 
Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark
 Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark
Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark
 
Deep learning with TensorFlow
Deep learning with TensorFlowDeep learning with TensorFlow
Deep learning with TensorFlow
 
Video Analytics At Scale: DL, CV, ML On Databricks Platform
Video Analytics At Scale: DL, CV, ML On Databricks PlatformVideo Analytics At Scale: DL, CV, ML On Databricks Platform
Video Analytics At Scale: DL, CV, ML On Databricks Platform
 
Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...
Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...
Building Deep Reinforcement Learning Applications on Apache Spark with Analyt...
 
Intro to Machine Learning for GPUs
Intro to Machine Learning for GPUsIntro to Machine Learning for GPUs
Intro to Machine Learning for GPUs
 
GDG-Shanghai 2017 TensorFlow Summit Recap
GDG-Shanghai 2017 TensorFlow Summit RecapGDG-Shanghai 2017 TensorFlow Summit Recap
GDG-Shanghai 2017 TensorFlow Summit Recap
 
Lessons Learned while Implementing a Sparse Logistic Regression Algorithm in ...
Lessons Learned while Implementing a Sparse Logistic Regression Algorithm in ...Lessons Learned while Implementing a Sparse Logistic Regression Algorithm in ...
Lessons Learned while Implementing a Sparse Logistic Regression Algorithm in ...
 
Scalable Ensemble Machine Learning @ Harvard Health Policy Data Science Lab
Scalable Ensemble Machine Learning @ Harvard Health Policy Data Science LabScalable Ensemble Machine Learning @ Harvard Health Policy Data Science Lab
Scalable Ensemble Machine Learning @ Harvard Health Policy Data Science Lab
 
Better {ML} Together: GraphLab Create + Spark
Better {ML} Together: GraphLab Create + Spark Better {ML} Together: GraphLab Create + Spark
Better {ML} Together: GraphLab Create + Spark
 
Distributed Inference on Large Datasets Using Apache MXNet and Apache Spark ...
 Distributed Inference on Large Datasets Using Apache MXNet and Apache Spark ... Distributed Inference on Large Datasets Using Apache MXNet and Apache Spark ...
Distributed Inference on Large Datasets Using Apache MXNet and Apache Spark ...
 
Accelerating Data Science with Better Data Engineering on Databricks
Accelerating Data Science with Better Data Engineering on DatabricksAccelerating Data Science with Better Data Engineering on Databricks
Accelerating Data Science with Better Data Engineering on Databricks
 
New Capabilities in the PyData Ecosystem
New Capabilities in the PyData EcosystemNew Capabilities in the PyData Ecosystem
New Capabilities in the PyData Ecosystem
 
Automated Data Exploration: Building efficient analysis pipelines with Dask
Automated Data Exploration: Building efficient analysis pipelines with DaskAutomated Data Exploration: Building efficient analysis pipelines with Dask
Automated Data Exploration: Building efficient analysis pipelines with Dask
 
Meetup tensorframes
Meetup tensorframesMeetup tensorframes
Meetup tensorframes
 
Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017
Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017
Aran Khanna, Software Engineer, Amazon Web Services at MLconf ATL 2017
 

Similar to Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning Services

Threaded Programming
Threaded ProgrammingThreaded Programming
Threaded Programming
Sri Prasanna
 

Similar to Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning Services (20)

What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++
 
Amazon SageMaker을 통한 손쉬운 Jupyter Notebook 활용하기 - 윤석찬 (AWS 테크에반젤리스트)
Amazon SageMaker을 통한 손쉬운 Jupyter Notebook 활용하기  - 윤석찬 (AWS 테크에반젤리스트)Amazon SageMaker을 통한 손쉬운 Jupyter Notebook 활용하기  - 윤석찬 (AWS 테크에반젤리스트)
Amazon SageMaker을 통한 손쉬운 Jupyter Notebook 활용하기 - 윤석찬 (AWS 테크에반젤리스트)
 
Threaded Programming
Threaded ProgrammingThreaded Programming
Threaded Programming
 
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
 
Achitecture Aware Algorithms and Software for Peta and Exascale
Achitecture Aware Algorithms and Software for Peta and ExascaleAchitecture Aware Algorithms and Software for Peta and Exascale
Achitecture Aware Algorithms and Software for Peta and Exascale
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
 
Leveraging R in Big Data of Mobile Ads (R在行動廣告大數據的應用)
Leveraging R in Big Data of Mobile Ads (R在行動廣告大數據的應用)Leveraging R in Big Data of Mobile Ads (R在行動廣告大數據的應用)
Leveraging R in Big Data of Mobile Ads (R在行動廣告大數據的應用)
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読み
 
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
 
Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and Spark
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
 
pgconfasia2016 plcuda en
pgconfasia2016 plcuda enpgconfasia2016 plcuda en
pgconfasia2016 plcuda en
 
R and cpp
R and cppR and cpp
R and cpp
 
Mathematics and development of fast TLS handshakes
Mathematics and development of fast TLS handshakesMathematics and development of fast TLS handshakes
Mathematics and development of fast TLS handshakes
 
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
 
design-compiler.pdf
design-compiler.pdfdesign-compiler.pdf
design-compiler.pdf
 
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告
 

More from Naoki (Neo) SATO

How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
Naoki (Neo) SATO
 

More from Naoki (Neo) SATO (20)

LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flow
 
Microsoft Copilot, your everyday AI companion (Machine Learning 15minutes! Br...
Microsoft Copilot, your everyday AI companion (Machine Learning 15minutes! Br...Microsoft Copilot, your everyday AI companion (Machine Learning 15minutes! Br...
Microsoft Copilot, your everyday AI companion (Machine Learning 15minutes! Br...
 
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
 
Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)
Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)
Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)
 
30分でわかるマイクロサービスアーキテクチャ 第2版
30分でわかるマイクロサービスアーキテクチャ 第2版30分でわかるマイクロサービスアーキテクチャ 第2版
30分でわかるマイクロサービスアーキテクチャ 第2版
 
[Machine Learning 15minutes! Broadcast #67] Azure AI - Build 2022 Updates and...
[Machine Learning 15minutes! Broadcast #67] Azure AI - Build 2022 Updates and...[Machine Learning 15minutes! Broadcast #67] Azure AI - Build 2022 Updates and...
[Machine Learning 15minutes! Broadcast #67] Azure AI - Build 2022 Updates and...
 
[Machine Learning 15minutes! #61] Azure OpenAI Service
[Machine Learning 15minutes! #61] Azure OpenAI Service[Machine Learning 15minutes! #61] Azure OpenAI Service
[Machine Learning 15minutes! #61] Azure OpenAI Service
 
[第50回 Machine Learning 15minutes! Broadcast] Azure Machine Learning - Ignite ...
[第50回 Machine Learning 15minutes! Broadcast] Azure Machine Learning - Ignite ...[第50回 Machine Learning 15minutes! Broadcast] Azure Machine Learning - Ignite ...
[第50回 Machine Learning 15minutes! Broadcast] Azure Machine Learning - Ignite ...
 
[Developers Festa Sapporo 2020] Microsoft/GitHubが提供するDeveloper Cloud (Develop...
[Developers Festa Sapporo 2020] Microsoft/GitHubが提供するDeveloper Cloud (Develop...[Developers Festa Sapporo 2020] Microsoft/GitHubが提供するDeveloper Cloud (Develop...
[Developers Festa Sapporo 2020] Microsoft/GitHubが提供するDeveloper Cloud (Develop...
 
[第2回 Azure Cosmos DB 勉強会] Data modelling and partitioning in Azure Cosmos DB ...
[第2回 Azure Cosmos DB 勉強会] Data modelling and partitioning in Azure Cosmos DB ...[第2回 Azure Cosmos DB 勉強会] Data modelling and partitioning in Azure Cosmos DB ...
[第2回 Azure Cosmos DB 勉強会] Data modelling and partitioning in Azure Cosmos DB ...
 
[第45回 Machine Learning 15minutes! Broadcast] Azure AI - Build 2020 Updates
[第45回 Machine Learning 15minutes! Broadcast] Azure AI - Build 2020 Updates[第45回 Machine Learning 15minutes! Broadcast] Azure AI - Build 2020 Updates
[第45回 Machine Learning 15minutes! Broadcast] Azure AI - Build 2020 Updates
 
[第43回 Machine Learning 15minutes! × 2] Azure AI Updates
[第43回 Machine Learning 15minutes! × 2] Azure AI Updates[第43回 Machine Learning 15minutes! × 2] Azure AI Updates
[第43回 Machine Learning 15minutes! × 2] Azure AI Updates
 
[Developers Festa Sapporo 2019] Azure Updates - Ignite 2019
[Developers Festa Sapporo 2019] Azure Updates - Ignite 2019[Developers Festa Sapporo 2019] Azure Updates - Ignite 2019
[Developers Festa Sapporo 2019] Azure Updates - Ignite 2019
 
[Serverless OpenHack Tokyo] Azure Serverless (Japanese)
[Serverless OpenHack Tokyo] Azure Serverless (Japanese)[Serverless OpenHack Tokyo] Azure Serverless (Japanese)
[Serverless OpenHack Tokyo] Azure Serverless (Japanese)
 
[Serverless OpenHack Tokyo] Azure Serverless (English)
[Serverless OpenHack Tokyo] Azure Serverless (English)[Serverless OpenHack Tokyo] Azure Serverless (English)
[Serverless OpenHack Tokyo] Azure Serverless (English)
 
[Azure Council Experts (ACE) 第37回定例会] Microsoft Azureアップデート情報 (2019/08/22-201...
[Azure Council Experts (ACE) 第37回定例会] Microsoft Azureアップデート情報 (2019/08/22-201...[Azure Council Experts (ACE) 第37回定例会] Microsoft Azureアップデート情報 (2019/08/22-201...
[Azure Council Experts (ACE) 第37回定例会] Microsoft Azureアップデート情報 (2019/08/22-201...
 
[db tech showcase Tokyo 2019] Azure Cosmos DB Deep Dive ~ Partitioning, Globa...
[db tech showcase Tokyo 2019] Azure Cosmos DB Deep Dive ~ Partitioning, Globa...[db tech showcase Tokyo 2019] Azure Cosmos DB Deep Dive ~ Partitioning, Globa...
[db tech showcase Tokyo 2019] Azure Cosmos DB Deep Dive ~ Partitioning, Globa...
 
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
 
[Azure Council Experts (ACE) 第36回定例会] Microsoft Azureアップデート情報 (2019/06/14-201...
[Azure Council Experts (ACE) 第36回定例会] Microsoft Azureアップデート情報 (2019/06/14-201...[Azure Council Experts (ACE) 第36回定例会] Microsoft Azureアップデート情報 (2019/06/14-201...
[Azure Council Experts (ACE) 第36回定例会] Microsoft Azureアップデート情報 (2019/06/14-201...
 
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
How to work with technology to survive as an engineer (エンジニアとして生き残るためのテクノロジーと...
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Recently uploaded (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 

Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning Services

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 14.
  • 15.
  • 16. Caffe Cognitive Toolkit MxNet TensorFlow Torch FCN5 (1024) 55.329ms 51.038ms 60.448ms 62.044ms 52.154ms AlexNet (256) 36.815ms 27.215ms 28.994ms 103.960ms 37.462ms ResNet (32) 143.987ms 81.470ms 84.545ms 181.404ms 90.935ms LSTM (256) (v7 benchmark) - 43.581ms (44.917ms) 288.142ms (284.898ms) - (223.547ms) 1130.606ms (906.958ms) http://dlbench.comp.hkbu.edu.hk/ Benchmarking by HKBU, Version 8 Single Tesla K80 GPU, CUDA: 8.0 CUDNN: v5.1 Caffe: 1.0rc5(39f28e4) CNTK: 2.0 Beta10(1ae666d) MXNet: 0.93(32dc3a2) TensorFlow: 1.0(4ac9c09) Torch: 7(748f5e3)
  • 17. 2 only supports 1 GPU Achieved with 1-bit gradient quantization algorithm 0 10000 20000 30000 40000 50000 60000 70000 80000 1 2 3 4 5 speed comparison (samples/second), higher = better [note: December 2015] Series1 Series2 Series3
  • 18. MICROSOFT COGNITIVE TOOLKIT First Deep Learning Framework Fully Optimized for Pascal 78 2,400 3,500 7,600 13,000 0 2,000 4,000 6,000 8,000 10,000 12,000 14,000 1 2 3 4 5 Toolkit Delivering Near-Linear Multi-GPU Scaling AlexNet Performance images/sec AlexNet training batch size 128, Grad Bit = 32, Dual socket E5-2699v4 CPUs (total 44 cores) CNTK 2.0b3 (to be released) includes cuDNN 5.1.8, NCCL 1.6.1, NVLink enabled 170x Faster v. CPU Server
  • 19.
  • 20.
  • 21. $ pip install <url> https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-CNTK-on-your-machine
  • 22.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Example: 2-hidden layer feed-forward NN h1 = s(W1 x + b1) h1 = sigmoid (x @ W1 + b1) h2 = s(W2 h1 + b2) h2 = sigmoid (h1 @ W2 + b2) P = softmax(Wout h2 + bout) P = softmax (h2 @ Wout + bout) with input x  RM and one-hot label L  RM and cross-entropy training criterion ce = LT log P ce = cross_entropy (L, P) Scorpusce = max
  • 29. Example: 2-hidden layer feed-forward NN h1 = s(W1 x + b1) h1 = sigmoid (x @ W1 + b1) h2 = s(W2 h1 + b2) h2 = sigmoid (h1 @ W2 + b2) P = softmax(Wout h2 + bout) P = softmax (h2 @ Wout + bout) with input x  RM and one-hot label y  RJ and cross-entropy training criterion ce = yT log P ce = cross_entropy (L, P) Scorpusce = max
  • 30. example: 2-hidden layer feed-forward NN h1 = s(W1 x + b1) h1 = sigmoid (x @ W1 + b1) h2 = s(W2 h1 + b2) h2 = sigmoid (h1 @ W2 + b2) P = softmax(Wout h2 + bout) P = softmax (h2 @ Wout + bout) with input x  RM and one-hot label y  RJ and cross-entropy training criterion ce = yT log P ce = cross_entropy (P, y) Scorpusce = max
  • 31. h1 = sigmoid (x @ W1 + b1) h2 = sigmoid (h1 @ W2 + b2) P = softmax (h2 @ Wout + bout) ce = cross_entropy (P, y)
  • 32. • + s • + s • + softmax W1 b1 W2 b2 Wout bout cross_entropy h1 h2 P x y h1 = sigmoid (x @ W1 + b1) h2 = sigmoid (h1 @ W2 + b2) P = softmax (h2 @ Wout + bout) ce = cross_entropy (P, y) ce
  • 34. Script configure and executes through CNTK Python APIs… trainer • SGD (momentum, Adam, …) • minibatching reader • minibatch source • task-specific deserializer • automatic randomization • distributed reading corpus model network • model function • criterion function • CPU/GPU execution engine • packing, padding
  • 35. from cntk import * # reader def create_reader(path, is_training): ... # network def create_model_function(): ... def create_criterion_function(model): ... # trainer (and evaluator) def train(reader, model): ... def evaluate(reader, model): ... # main function model = create_model_function() reader = create_reader(..., is_training=True) train(reader, model) reader = create_reader(..., is_training=False) evaluate(reader, model)
  • 36.
  • 37. def create_reader(map_file, mean_file, is_training): # image preprocessing pipeline transforms = [ ImageDeserializer.crop(crop_type='Random', ratio=0.8, jitter_type='uniRatio') ImageDeserializer.scale(width=image_width, height=image_height, channels=num_channels, interpolations='linear'), ImageDeserializer.mean(mean_file) ] # deserializer return MinibatchSource(ImageDeserializer(map_file, StreamDefs( features = StreamDef(field='image', transforms=transforms), ' labels = StreamDef(field='label', shape=num_classes) )), randomize=is_training, epoch_size = INFINITELY_REPEAT if is_training else FULL_DATA_SWEEP)
  • 38. def create_reader(map_file, mean_file, is_training): # image preprocessing pipeline transforms = [ ImageDeserializer.crop(crop_type='Random', ratio=0.8, jitter_type='uniRatio') ImageDeserializer.scale(width=image_width, height=image_height, channels=num_channels, interpolations='linear'), ImageDeserializer.mean(mean_file) ] # deserializer return MinibatchSource(ImageDeserializer(map_file, StreamDefs( features = StreamDef(field='image', transforms=transforms), ' labels = StreamDef(field='label', shape=num_classes) )), randomize=is_training, epoch_size = INFINITELY_REPEAT if is_training else FULL_DATA_SWEEP)
  • 39. Model z = model(x): h1 = Dense(400, act = relu)(x) h2 = Dense(200, act = relu)(h1) r = Dense(10, act = None)(h2) return r Loss cross_entropy_with_softmax(z,Y)
  • 40. 28 pix 28pix Model z = model(x): h = Convolution2D((5,5),filt=8, …)(x) h = MaxPooling(…)(h) h = Convolution2D ((5,5),filt=16, …)((h) h = MaxPooling(…)(h) r = Dense(output_classes, act= None)(h) return r
  • 41. Problem: Tagging entities in Air Traffic Controller (ATIS) data Rec show o Rec burbank From_city Rec to o Rec seattle To_city Rec flights o Rec tomorrow Date http://karpathy.github.io/2015/05/21/rnn-effectiveness/
  • 42. 0 0 1 0 Ԧ𝑥(t) E i = 943 O= 150 L i = 150 O= 300 D i = 300 O= 129 a = sigmoid ℎ(t-1) ℎ(t) Ԧ𝑦(t) Ԧ𝑥(t) 0 0 1 0 Text token L E Ԧ𝑦(t)Class label D 1 x 943 z = model(): return Sequential([ Embedding(emb_dim=150), Recurrence(LSTM(hidden_dim=300), go_backwards=False), Dense(num_labels = 129) ])
  • 43. lr_schedule = C.learning_rate_schedule([0.05]*3 + [0.025]*2 + [0.0125], C.UnitType.minibatch, epoch_size=100) sgd_learner = C.sgd(z.parameters, lr_schedule)
  • 44. ATIS Train 96samples (mini-batch) . . . . #1 #2 #3 #96 Input feature ( 96 x Ԧ𝑥(t)) z = model(): return Sequential([ Embedding(emb_dim=150), Recurrence(LSTM(hidden_dim=300), go_backwards=False), Dense(num_labels = 129) ]) Loss cross_entropy_with_softmax(z,Y) Trainer(model, (loss, error), learner) Trainer.train_minibatch({X, Y}) Error classification_error(z,Y) Choose a learner (SGD, Adam, adagrad etc.) One-hot encoded Label (Y: 96 x 129/sample Or word in sequence) t23t1 t1 t1 t1 t15 t9 t12
  • 45.
  • 46.
  • 47. Function z = CNTKLib.Times(weightParam, input) + biasParam; Function loss = CNTKLib.CrossEntropyWithSoftmax(z, labelVariable); Function conv = CNTKLib.Pooling(CNTKLib.Convolution(convParam, input), PoolingType.Average, poolingWindowShape); Function resNetNode = CNTKLib.ReLU(CNTKLib.Plus(conv, input));
  • 48. var parameterLearners = new List<Learner>() { Learner.AdamLearner(classifierOutput.Parameters(), learningRate, momentum) }; var trainer = Trainer.CreateTrainer(classifierOutput, trainingLoss, prediction, parameterLearners);
  • 49. Function conv = CNTKLib.ReLU(CNTKLib.Convolution(convParams, features, strides )); Function pooling = CNTKLib.Pooling(conv, PoolingType.Max, poolingWindow, stride, padding); Function classifier = TestHelper.Dense(pooling, numClasses, device, Activation.None); var minibatchSource = MinibatchSource.TextFormatMinibatchSource("Train_cntk_text.txt"), streamConfigurations, MinibatchSource.InfinitelyRepeat);
  • 50. var minibatchData = minibatchSource.GetNextMinibatch(minibatchSize, device); var arguments = new Dictionary<Variable, MinibatchData> { { input, minibatchData[featureStreamInfo] }, { labels, minibatchData[labelStreamInfo] } }; trainer.TrainMinibatch(arguments, device);
  • 52.
  • 53.
  • 54. Accelerating adoption of AI by developers (consuming models) Rise of hybrid training and scoring scenarios Push scoring/inference to the event (edge, cloud, on-prem) Some developers moving into deep learning as non-traditional path to DS / AI dev Growth of diverse hardware arms race across all form factors (CPU / GPU / FPGA / ASIC / device) Data prep Model deployment & management Model lineage & auditing Explain-ability D ATA S C I E N C E & A I C H A L L E N G E SK E Y T R E N D S
  • 55. Challenge • Traditional power line inspection services are costly • Demand for low cost image scoring and support for multiple concurrent customers • Needed powerful AI to execute on a drone solution Solution • Deep learning to analyze multiple streaming data feeds • Azure GPUs support Single Shot multibox detectors • Reliable, consistent, and highly elastic scalability with Azure Batch Shipyards Drone-based electric grid inspector powered by deep learning
  • 56. snow leopard? Deep neural network Spark ML classifier Decision tree or logistic regression Image featuresImage Class 1 Class 1 Gap Identifying Snow Leopards Computer vision and classification on Spark
  • 57. Apps + insights Social LOB Graph IoT Image CRM INGEST STORE PREP & TRAIN MODEL & SERVE Data orchestration and monitoring Data lake and storage Hadoop/Spark/SQL and ML . IoT Azure Machine Learning T H E A I D E V E L O P M E N T L I F E C Y C L E
  • 58. Azure Machine Learning Studio Platform for data scientists to graphically build and deploy experiments • Rapid experiment composition • > 100 easily configured modules for data prep, training, evaluation • Extensibility through R & Python • Serverless training and deployment Some numbers: • 100’s of thousands of deployed models serving billions of requests
  • 59.
  • 60. Begin building now with the tools and platforms you know Build, deploy, and manage models at scale Boost productivity with agile development
  • 61. Notebooks IDEs Azure Machine Learning Workbench VS Code Tools for AI N E W C A PA B I L I T I E S Experimentation and Model Management Services AZURE MACHINE LEARNING SERVICES Spark SQL Server Virtual machines GPUs Container services SQL Server Machine Learning Server ON-PREMISES EDGE Azure IoT Edge TRAIN & DEPLOY OPTIONS AZURE
  • 62.
  • 63.
  • 64.
  • 65.
  • 66. Local machine Scale up to DSVM Scale out with Spark on HDInsight Azure Batch AI (Coming Soon) ML Server Experiment Everywhere A ZURE ML EXPERIMENTATION Command line tools IDEs Notebooks in Workbench VS Code Tools for AI
  • 67. Manage project dependencies Manage training jobs locally, scaled-up or scaled-out Git based checkpointing and version control Service side capture of run metrics, output logs and models Use your favorite IDE, and any framework Experimentation service U S E T H E M O S T P O P U L A R I N N O VAT I O N S U S E A N Y TO O L U S E A N Y F R A M E W O R K O R L I B R A R Y
  • 68. DOCKER Single node deployment (cloud/on-prem) Azure Container Service Azure IoT Edge Microsoft ML Server Spark clusters SQL Server Deploy Everywhere A ZURE ML MODEL MANAGEMENT
  • 69. Deployment and management of models as HTTP services Container-based hosting of real time and batch processing Management and monitoring through Azure Application Insights First class support for SparkML, Python, Cognitive Toolkit, TF, R, extensible to support others (Caffe, MXnet) Service authoring in Python Manage models
  • 71. VS Code extension with deep integration to Azure ML End to end development environment, from new project through training Support for remote training Job management On top of all of the goodness of VS Code (Python, Jupyter, Git, etc) VS Code Tools for AI
  • 72. Windows and Mac based companion for AI development Full environment set up (Python, Jupyter, etc) Embedded notebooks Run History and Comparison experience New data wrangling tools Azure Machine Learning Workbench - What Is It?
  • 73. AI Powered Data Wrangling Rapidly sample, understand, and prep data Leverage PROSE and more for intelligent, data prep by example Extend/customize transforms and featurization through Python Generate Python and Pyspark for execution at scale
  • 74.
  • 75. Machine Learning & AI Portfolio When to use what? What engine(s) do you want to use? Deployment target Which experience do you want? Build your own or consume pre- trained models? Microsoft ML & AI products Build your own Azure Machine Learning Code first (On-prem) ML Server On- prem Hadoop SQL Server (cloud) AML services (Preview) SQL Server Spark Hadoop Azure Batch DSVM Azure Container Service Visual tooling (cloud) AML Studio Consume Cognitive services, bots
  • 76.