Deep Learning with TensorFlow
Rajat Monga
Engineering Director, TensorFlow
How complex are
Machine Learning Systems?
Neural networks
Inception (2015)
That’s not all...
Input
Parameters
Labels
Prediction Loss
Update
Parameters
Labels
Prediction Loss
Update
Input
batch
...
That’s not all...
That’s not all...
Input
batch
...
Parameters
Labels
Prediction Loss
Update
Parameter Server
That’s not all...
Input
batch
...
Parameters Update
Model
Worker
UpdateUpdateUpdate
Model
That’s not all...
Input
batch
...
Parameters Update
Model
Model
Model
...
Parallelize this!
Distribute this!
Raspberry
Pi
Android iOS
Portability is a requirement
TPU
GPU
CPU
machine learning gets complex quickly
Modeling complexityHeterogenous
System
Distributed
System
repository
for “machine learning”
category on GitHub
#1
Released in Nov. 2015
10,000+ commits since Nov, 2015
490+ contributors
1M+ binary downloads
#20 most popular repository on GitHub by stars
Used in ML classes at many universities:
Toronto, Berkeley, Stanford, ...
Some Stats
TensorFlow powered Cucumber Sorter
From: http://workpiles.com/2016/02/tensorflow-cnn-cucumber/
machine learning gets complex quickly
Modeling complexityHeterogenous
System
Distributed
System
Platforms
Languages
TensorFlow Architecture
CPU GPU Android iOS ...
C++ front end Python front end ...
Kernels
Bindings + Compound Ops
add mul Print reshape ...
Core TensorFlow Execution System
Ops
Ecosystem
machine learning gets complex quickly
Modeling complexityHeterogenous
System
Distributed
System
Parallelism in Op implementations
MatMul
...
...
...
...
...
...
...MatMul
MatMul
Task Parallelism in DataFlow graph
Data Parallelism
MatMul
Input
MatMulParam
...
...MatMul
MatMul
...
...
Model Parallelism
MatMul
Matrix
Matrix
MatMul
Split Concat
GPU 0 CPU
Add Mul
biases
learning rate
−=...
...
Distribution across Devices
GPU 0 CPU
Add Mul
biases
learning rate
−=...
...
Distribution
● TensorFlow inserts Send/Recv Ops to transport tensors across devices
● Recv ops pull data from Send ops
Send Recv
GPU 0 CPU
Add Mul
biases
learning rate
−=...
...
Distribution
● TensorFlow inserts Send/Recv Ops to transport tensors across devices
● Recv ops pull data from Send ops
Send Recv
Send Recv
Send
Recv Send
Recv
Scale across machines
machine learning gets complex quickly
Modeling complexityHeterogenous
System
Distributed
System
MatMul
Add Relu
biases
weights
input
input = ...
biases = tf.get_variable(’biases’, ...)
weights = tf.get_variable(’weights’, ...)
out = tf.matmul(input, weights)
out = tf.add(out, biases)
out = tf.nn.relu(out)
MatMul
Add Relu
biases
weights
input
input = ...
output = tf.contrib.layers.fully_connected(input, ...)
Align cognitive model with programming model
Each box is one line of code!
TensorFlow contains complete algorithms
Linear{Classifier,Regressor}
DNN{Classifier,Regressor}
DNNLinearCombined{Classifier,Regressor}
SVM
KMeansClustering
GMM
...
Simple machine learning
classifier = learn.LinearClassifier(feature_columns=feature_columns,
n_classes=10)
classifier.fit(data, labels, batch_size=100, steps=1000)
classifier.evaluate(eval_data, eval_labels)
Tooling provided for distributed training and evaluation, graphical debugging, and
export to production server (tensorflow/serving).
UpdateUpdateUpdate
Model
Remember this?
Input
batch
...
Parameters Update
Model
Model
Model
...
Parallelize this!
Distribute this!
TensorFlow handles complexity for you...
...so you can focus on your ideas
41
Ready to use Machine
Learning models
Use your own data to
train models
Cloud
Vision API
Cloud
Translate API
Cloud Machine Learning
Develop - Model - Test
Google
BigQuery
Cloud
Storage
Cloud
Datalab
Beta
GA BetaGA
Beta
GA
GA
Cloud
Natural Language
API
Beta
Cloud
Speech API
TensorFlow
Cats
AutoTrash http://myplace.frontier.com/~r.bond/cats/cats.htm
AutoTrash http://myplace.frontier.com/~r.bond/cats/cats.htm
Rajat Monga
@rajatmonga
Thank You!

Rajat Monga, Engineering Director, TensorFlow, Google at MLconf 2016