machine intelligence at google scale: tensorflow
TRANSCRIPT
![Page 1: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/1.jpg)
Machine Intelligence at Google Scale:
TensorFlow
![Page 2: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/2.jpg)
Data is Everything.How well you use your data can determine the degree of your success.
![Page 3: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/3.jpg)
What is Machine Learning?
data algorithm insight
![Page 4: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/4.jpg)
Beach
Woman
Pool
Coast
Water
![Page 5: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/5.jpg)
Google Translate
![Page 6: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/6.jpg)
Human: Someone is using a small grill to melt his sandwich.
Neural Model: A person is cooking some food on a grill.
![Page 7: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/7.jpg)
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
![Page 8: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/8.jpg)
Growing Use of Deep Learning at GoogleNumber of directories containing model description files
Uniq
ue P
roje
ct D
irect
orie
s
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
![Page 9: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/9.jpg)
The Machine Learning Spectrum
TensorFlow Cloud Machine Learning Machine Learning APIs
Data Scientist
![Page 10: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/10.jpg)
TensorFlow
![Page 11: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/11.jpg)
● 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?
![Page 12: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/12.jpg)
Portable● Training on:
○ Data Center
○ CPUs, GPUs and etc
● Running on:
○ Mobile phones
○ IoT devices
![Page 13: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/13.jpg)
Computation as a Dataflow Graph
Graph of Nodes, also called operations (ops)
MatMul
Add Softmax
biases
weights
inputs
targets
Xent
![Page 14: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/14.jpg)
Dataflow Graph (forward)
Edges are N-dimensional arrays: Tensors
MatMul
Add Softmax
biases
weights
inputs
targets
Xent
![Page 15: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/15.jpg)
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
![Page 16: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/16.jpg)
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
![Page 17: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/17.jpg)
Example: Logistic Regression1. 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
![Page 18: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/18.jpg)
Visualizing learning
![Page 19: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/19.jpg)
Visualizing graphs
![Page 20: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/20.jpg)
Portable● Training on:
○ Data Center
○ CPUs, GPUs and etc
● Running on:
○ Mobile phones
○ IoT devices
![Page 21: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/21.jpg)
TensorBoard: visualization tool
![Page 22: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/22.jpg)
The Machine Learning Spectrum
TensorFlow Cloud Machine Learning Machine Learning APIs
Application Developer
Data Scientist
![Page 23: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/23.jpg)
Cloud Machine Learning Platform
Pre-Processing TrainingML 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
![Page 24: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/24.jpg)
Can I Hug That?
![Page 25: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/25.jpg)
Can I Hug That?
Images
Labels
Trained Classifier
Question
Hug / Not Hug
![Page 26: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/26.jpg)
Demo
![Page 27: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/27.jpg)
![Page 28: Machine Intelligence at Google Scale: TensorFlow](https://reader034.vdocuments.net/reader034/viewer/2022052117/586e73c81a28ab99598b55b3/html5/thumbnails/28.jpg)
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