Introduction to TensorFlow
Introduction to
TensorFlow
GDG Cloud Belgium
29/09/2016
Matthias Feys
Introduction to TensorFlow 2
About myself (Matthias Feys)
work at Datatonic:
- Big Data (Dataflow/Spark)
- Machine Learning (TensorFlow/sklearn)
- DataViz (Tableau/Spotfire)
Google Qualified Developer
Contact me:
- @FsMatt
- matthias@datatonic.com
Introduction to TensorFlow 3
1. What is TensorFlow?
2. Why would you use it?
3. How does it work? + Demo
4. CloudML (alpha) discussion
Agenda
PLACE IMAGE HERE
4
Google TensorFlow
● Originally developed by the Google
Brain Team within Google's Machine
Intelligence research organization
● TensorFlow provides primitives for
defining functions on tensors and
automatically computing their
derivatives.
● An open source software library for
numerical computation using data
flow graphs
TensorFlow
5
Tensor?
Simply put: Tensors can be viewed as a
multidimensional array of numbers.
This means that:
● A scalar is a tensor,
● A vector is a tensor,
● A matrix is a tensor
● ...
6
Data Flow Graph?
● Computations are represented as graphs:
● Nodes are the operations (ops)
● Edges are the Tensors
(multidimensional arrays)
● Typical program consists of 2 phases:
● construction phase: assembling a
graph (model)
● execution phase:
pushing data through the graph
7
Neural Networks? Deep Learning?
● Neural Networks are represented by the lower figure,
not the top one....
● Link:
Tinker with a Neural Network in Your Browser
Presentation title (Go to View > Master to edit) 8
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 9
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 10
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 11
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 12
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 13
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 14
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 15
Source: https://www.udacity.com/course/deep-learning--ud730
Presentation title (Go to View > Master to edit) 16
Source: https://www.udacity.com/course/deep-learning--ud730
Introduction to TensorFlow 17
1. What is TensorFlow?
2. Why would you use it?
3. How does it work? + Demo
4. CloudML (alpha) discussion
Agenda
Introduction to TensorFlow 18
Why would you use NN / Deep Learning?
● Neural Networks (NNs) are universal
function approximators that work very
well with huge datasets
● NNs / deep networks do unsupervised
feature learning
● Track record, being SotA in:
○ image classification,
○ language processing,
○ speech recognition,
○ ...
19
Why TensorFlow?
There are a lot of alternatives:
● Torch
● Caffe
● Theano (Keras, Lasagne)
● CuDNN
● Mxnet
● DSSTNE
● DL4J
● DIANNE
● Etc.
Introduction to TensorFlow 20
TensorFlow has the largest community
Sources: http://deliprao.com/archives/168
http://www.slideshare.net/JenAman/large-scale-deep-learning-wit
h-tensorflow
Introduction to TensorFlow 21
TensorFlow is very portable/scalable
Runs on CPUs, GPUs, TPUs over one or more
machines, but also on phones(android+iOS)
and raspberry pi’s...
Introduction to TensorFlow 22
TensorFlow is more than an R&D project
- Specific functionalities for deployment (TF Serving /
CloudML)
- Easier/more documentation (for more general public)
- Included visualization tool (Tensorboard)
- Simplified interfaces like SKFlow
Introduction to TensorFlow 23
1. What is TensorFlow?
2. Why would you use it?
3. How does it work? + Demo
4. CloudML (alpha) discussion
Agenda
Introduction to TensorFlow 24
How does it work?
Number Recognition w TF explained (in notebook) Speech classification (demo)
Great starting point:
https://github.com/tensorflow/models
Tensorboard notebook:
here
Introduction to TensorFlow 25
Do It Yourself! (in Datalab)
Do It Yourself:
1) Open Cloud Shell
2) Paste these commands:
3) Enter the returned EXTERNAL-IP+”:8080” in your browser
gcloud container clusters create datalab-cluster --machine-type n1-standard-4
--num-nodes 1 --zone europe-west1-d
kubectl run datalab --image=gcr.io/cloud-datalab/datalab:mlbeta2 --port=8080
kubectl expose deployment datalab --type="LoadBalancer"
kubectl get service datalab
Introduction to TensorFlow 26
1. What is TensorFlow?
2. Why would you use it?
3. How does it work? + Demo
4. CloudML (alpha) discussion
Agenda
27
CloudML
1
2
3
2
1
Introduction to TensorFlow 28
- Curated list of TF resources: https://github.com/jtoy/awesome-tensorflow
- Models implemented in TF: https://github.com/tensorflow/models
- Slides “TF tricks of the trade”: https://drive.google.com/open?id=x_...
- Slides “TF and Deep Learning without a PhD”: https://docs.google.com/presentation/d/...
- Blogpost “DL with spark and TF”: https://databricks.com/blog/...
- The official documentation: https://www.tensorflow.org/versions/r0.10/...
Join: https://www.meetup.com/TensorFlow-Belgium
Further reading
Introduction to TensorFlow 29
Thank you

Introduction to TensorFlow

  • 1.
    Introduction to TensorFlow Introductionto TensorFlow GDG Cloud Belgium 29/09/2016 Matthias Feys
  • 2.
    Introduction to TensorFlow2 About myself (Matthias Feys) work at Datatonic: - Big Data (Dataflow/Spark) - Machine Learning (TensorFlow/sklearn) - DataViz (Tableau/Spotfire) Google Qualified Developer Contact me: - @FsMatt - matthias@datatonic.com
  • 3.
    Introduction to TensorFlow3 1. What is TensorFlow? 2. Why would you use it? 3. How does it work? + Demo 4. CloudML (alpha) discussion Agenda
  • 4.
    PLACE IMAGE HERE 4 GoogleTensorFlow ● Originally developed by the Google Brain Team within Google's Machine Intelligence research organization ● TensorFlow provides primitives for defining functions on tensors and automatically computing their derivatives. ● An open source software library for numerical computation using data flow graphs TensorFlow
  • 5.
    5 Tensor? Simply put: Tensorscan be viewed as a multidimensional array of numbers. This means that: ● A scalar is a tensor, ● A vector is a tensor, ● A matrix is a tensor ● ...
  • 6.
    6 Data Flow Graph? ●Computations are represented as graphs: ● Nodes are the operations (ops) ● Edges are the Tensors (multidimensional arrays) ● Typical program consists of 2 phases: ● construction phase: assembling a graph (model) ● execution phase: pushing data through the graph
  • 7.
    7 Neural Networks? DeepLearning? ● Neural Networks are represented by the lower figure, not the top one.... ● Link: Tinker with a Neural Network in Your Browser
  • 8.
    Presentation title (Goto View > Master to edit) 8 Source: https://www.udacity.com/course/deep-learning--ud730
  • 9.
    Presentation title (Goto View > Master to edit) 9 Source: https://www.udacity.com/course/deep-learning--ud730
  • 10.
    Presentation title (Goto View > Master to edit) 10 Source: https://www.udacity.com/course/deep-learning--ud730
  • 11.
    Presentation title (Goto View > Master to edit) 11 Source: https://www.udacity.com/course/deep-learning--ud730
  • 12.
    Presentation title (Goto View > Master to edit) 12 Source: https://www.udacity.com/course/deep-learning--ud730
  • 13.
    Presentation title (Goto View > Master to edit) 13 Source: https://www.udacity.com/course/deep-learning--ud730
  • 14.
    Presentation title (Goto View > Master to edit) 14 Source: https://www.udacity.com/course/deep-learning--ud730
  • 15.
    Presentation title (Goto View > Master to edit) 15 Source: https://www.udacity.com/course/deep-learning--ud730
  • 16.
    Presentation title (Goto View > Master to edit) 16 Source: https://www.udacity.com/course/deep-learning--ud730
  • 17.
    Introduction to TensorFlow17 1. What is TensorFlow? 2. Why would you use it? 3. How does it work? + Demo 4. CloudML (alpha) discussion Agenda
  • 18.
    Introduction to TensorFlow18 Why would you use NN / Deep Learning? ● Neural Networks (NNs) are universal function approximators that work very well with huge datasets ● NNs / deep networks do unsupervised feature learning ● Track record, being SotA in: ○ image classification, ○ language processing, ○ speech recognition, ○ ...
  • 19.
    19 Why TensorFlow? There area lot of alternatives: ● Torch ● Caffe ● Theano (Keras, Lasagne) ● CuDNN ● Mxnet ● DSSTNE ● DL4J ● DIANNE ● Etc.
  • 20.
    Introduction to TensorFlow20 TensorFlow has the largest community Sources: http://deliprao.com/archives/168 http://www.slideshare.net/JenAman/large-scale-deep-learning-wit h-tensorflow
  • 21.
    Introduction to TensorFlow21 TensorFlow is very portable/scalable Runs on CPUs, GPUs, TPUs over one or more machines, but also on phones(android+iOS) and raspberry pi’s...
  • 22.
    Introduction to TensorFlow22 TensorFlow is more than an R&D project - Specific functionalities for deployment (TF Serving / CloudML) - Easier/more documentation (for more general public) - Included visualization tool (Tensorboard) - Simplified interfaces like SKFlow
  • 23.
    Introduction to TensorFlow23 1. What is TensorFlow? 2. Why would you use it? 3. How does it work? + Demo 4. CloudML (alpha) discussion Agenda
  • 24.
    Introduction to TensorFlow24 How does it work? Number Recognition w TF explained (in notebook) Speech classification (demo) Great starting point: https://github.com/tensorflow/models Tensorboard notebook: here
  • 25.
    Introduction to TensorFlow25 Do It Yourself! (in Datalab) Do It Yourself: 1) Open Cloud Shell 2) Paste these commands: 3) Enter the returned EXTERNAL-IP+”:8080” in your browser gcloud container clusters create datalab-cluster --machine-type n1-standard-4 --num-nodes 1 --zone europe-west1-d kubectl run datalab --image=gcr.io/cloud-datalab/datalab:mlbeta2 --port=8080 kubectl expose deployment datalab --type="LoadBalancer" kubectl get service datalab
  • 26.
    Introduction to TensorFlow26 1. What is TensorFlow? 2. Why would you use it? 3. How does it work? + Demo 4. CloudML (alpha) discussion Agenda
  • 27.
  • 28.
    Introduction to TensorFlow28 - Curated list of TF resources: https://github.com/jtoy/awesome-tensorflow - Models implemented in TF: https://github.com/tensorflow/models - Slides “TF tricks of the trade”: https://drive.google.com/open?id=x_... - Slides “TF and Deep Learning without a PhD”: https://docs.google.com/presentation/d/... - Blogpost “DL with spark and TF”: https://databricks.com/blog/... - The official documentation: https://www.tensorflow.org/versions/r0.10/... Join: https://www.meetup.com/TensorFlow-Belgium Further reading
  • 29.