Machine Intelligence at Google Scale:
TensorFlow
Data is Everything.
How well you use your data can determine the degree of your success.
What is Machine Learning?
data algorithm insight
Beach
Woman
Pool
Coast
Water
Google Translate
Human:
Someone is using a small
grill to melt his sandwich.
Neural Model:
A person is cooking some
food on a grill.
One example (of 100s): “Neural Art” in TensorFlow
An implementation of
"A neural algorithm of Artistic
style" in TensorFlow, for
● Introductory, hackable demos
for TensorFlow, and
● Demonstrating the use of
importing various Caffe
cnn models (VGG and
illustration2vec) in TF.
github.com/woodrush/neural-art-tf
Growing Use of Deep Learning at Google
Number of directories containing model description files
UniqueProjectDirectories
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3
2000
1500
1000
500
0
Across many products/areas
● Apps
● Maps
● Photos
● Gmail
● Speech
● Android
● YouTube
● Translation
● Robotics Research
● Image Understanding
● Natural Language
Understanding
● Drug Discovery
2012 2013 2014 2015
Q4
The Machine Learning Spectrum
TensorFlow Cloud Machine Learning Machine Learning APIs
Data Scientist
TensorFlow
● Google's open source library for machine intelligence
● Tensor: N-dimensional array
● Flow: data flow computation framework (like
MapReduce)
● tensorflow.org launched in Nov 2015
○ Most popular Machine Learning library
○ 20,000+ stars / 7000+ forks
○ 165 contributors / > 3000 commits
What is TensorFlow?
Portable
● Training on:
○ Data Center
○ CPUs, GPUs and etc
● Running on:
○ Mobile phones
○ IoT devices
Computation as a Dataflow Graph
Graph of Nodes, also called operations (ops)
MatMul
Add Softmax
biases
weights
inputs
targets
Xent
Dataflow Graph (forward)
Edges are N-dimensional arrays: Tensors
MatMul
Add Softmax
biases
weights
inputs
targets
Xent
Dataflow Graph (backward graph and updates)
Backward graph and update are added automatically to graph
Add Mul
biases
...
learning rate
−=...
'Biases' is a variable −= updates biasesSome ops compute gradients
Dataflow Graph
● In practice often very complex with 100s
or 1000s of nodes and edges
● “Inference” means to execute just the
forward path of the graph
Example: Logistic Regression
1. N examples of data
○ Input xn
○ Target tn
2. Model with parameters (weights W, biases b)
○ yn
= Softmax(W * xn
+ b)
3. CrossEntropy loss to minimize
○ loss = -Sum(tn
* ln(yn
))
4. Minimization by Gradient Descent
○ requires gradients of loss with respect to parameters W, b
● TensorFlow does automatic differentiation
● Gradient calculation done by TF once model & loss defined
Visualizing learning
Visualizing graphs
Portable
● Training on:
○ Data Center
○ CPUs, GPUs and etc
● Running on:
○ Mobile phones
○ IoT devices
TensorBoard: visualization tool
The Machine Learning Spectrum
TensorFlow Cloud Machine Learning Machine Learning APIs
Application Developer
Data Scientist
Cloud Machine Learning Platform
Pre-Processing Training
ML Authoring
ML Analysis
Hosted Model Monitoring &
Logging
Training
Prediction
● Intelligent Text Processing
● Image Feature Processing
● Managed Infrastructure
● Scalable Algorithms
● HW Acceleration
Evaluation
● Detailed Model Metrics
● In-process model viz
● No-ops experience
Batch
Real-Time
input
output
● Hosted Model experience
● AutoScaling
● Anytime access
Data
Console
Model & Job
Mgmt
Datalab
Can I Hug That?
Can I Hug That?
Images
Labels
Trained
Classifier
Question
Hug / Not Hug
Demo
Confidential & ProprietaryGoogle Cloud Platform 28
Easy to use API: pass in an image, we give you insight:
Google Cloud Vision API
Label
Detection OCR
Explicit
Content
Detection
Facial
Detection
Landmark
Detection
Logo
Detection

Machine Intelligence at Google Scale: TensorFlow

  • 1.
    Machine Intelligence atGoogle Scale: TensorFlow
  • 2.
    Data is Everything. Howwell you use your data can determine the degree of your success.
  • 3.
    What is MachineLearning? data algorithm insight
  • 4.
  • 5.
  • 6.
    Human: Someone is usinga small grill to melt his sandwich. Neural Model: A person is cooking some food on a grill.
  • 7.
    One example (of100s): “Neural Art” in TensorFlow An implementation of "A neural algorithm of Artistic style" in TensorFlow, for ● Introductory, hackable demos for TensorFlow, and ● Demonstrating the use of importing various Caffe cnn models (VGG and illustration2vec) in TF. github.com/woodrush/neural-art-tf
  • 8.
    Growing Use ofDeep Learning at Google Number of directories containing model description files UniqueProjectDirectories Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 2000 1500 1000 500 0 Across many products/areas ● Apps ● Maps ● Photos ● Gmail ● Speech ● Android ● YouTube ● Translation ● Robotics Research ● Image Understanding ● Natural Language Understanding ● Drug Discovery 2012 2013 2014 2015 Q4
  • 9.
    The Machine LearningSpectrum TensorFlow Cloud Machine Learning Machine Learning APIs Data Scientist
  • 10.
  • 11.
    ● Google's opensource library for machine intelligence ● Tensor: N-dimensional array ● Flow: data flow computation framework (like MapReduce) ● tensorflow.org launched in Nov 2015 ○ Most popular Machine Learning library ○ 20,000+ stars / 7000+ forks ○ 165 contributors / > 3000 commits What is TensorFlow?
  • 12.
    Portable ● Training on: ○Data Center ○ CPUs, GPUs and etc ● Running on: ○ Mobile phones ○ IoT devices
  • 13.
    Computation as aDataflow Graph Graph of Nodes, also called operations (ops) MatMul Add Softmax biases weights inputs targets Xent
  • 14.
    Dataflow Graph (forward) Edgesare N-dimensional arrays: Tensors MatMul Add Softmax biases weights inputs targets Xent
  • 15.
    Dataflow Graph (backwardgraph and updates) Backward graph and update are added automatically to graph Add Mul biases ... learning rate −=... 'Biases' is a variable −= updates biasesSome ops compute gradients
  • 16.
    Dataflow Graph ● Inpractice often very complex with 100s or 1000s of nodes and edges ● “Inference” means to execute just the forward path of the graph
  • 17.
    Example: Logistic Regression 1.N examples of data ○ Input xn ○ Target tn 2. Model with parameters (weights W, biases b) ○ yn = Softmax(W * xn + b) 3. CrossEntropy loss to minimize ○ loss = -Sum(tn * ln(yn )) 4. Minimization by Gradient Descent ○ requires gradients of loss with respect to parameters W, b ● TensorFlow does automatic differentiation ● Gradient calculation done by TF once model & loss defined
  • 18.
  • 19.
  • 20.
    Portable ● Training on: ○Data Center ○ CPUs, GPUs and etc ● Running on: ○ Mobile phones ○ IoT devices
  • 21.
  • 22.
    The Machine LearningSpectrum TensorFlow Cloud Machine Learning Machine Learning APIs Application Developer Data Scientist
  • 23.
    Cloud Machine LearningPlatform Pre-Processing Training ML Authoring ML Analysis Hosted Model Monitoring & Logging Training Prediction ● Intelligent Text Processing ● Image Feature Processing ● Managed Infrastructure ● Scalable Algorithms ● HW Acceleration Evaluation ● Detailed Model Metrics ● In-process model viz ● No-ops experience Batch Real-Time input output ● Hosted Model experience ● AutoScaling ● Anytime access Data Console Model & Job Mgmt Datalab
  • 24.
    Can I HugThat?
  • 25.
    Can I HugThat? Images Labels Trained Classifier Question Hug / Not Hug
  • 26.
  • 28.
    Confidential & ProprietaryGoogleCloud Platform 28 Easy to use API: pass in an image, we give you insight: Google Cloud Vision API Label Detection OCR Explicit Content Detection Facial Detection Landmark Detection Logo Detection