TensorFlow
• Purpose: Machine Learning & deep Learning research
• Open Source (By Google)
• Numerical Computation using data flow graphs
Agenda
• Artificial Intelligence
• Machine learning
• Deep Learning
• Why would you use Deep Learning?
• TensorFlow
o TensorFlow Story
o Tensorflow Model
o Data flow graphs
o Architecture
o Portable & scalable
o Programming model
o Companies using TensorFlow
AI & ML & DL
ArtificialIntelligence
• AI or artificial intelligence : is the simulation of human
intelligence processes by machines, especially computer
systems.
• These processes include learning (the information and
rules for using the information).
• reasoning (using the rules to reach approximate or
definite conclusions).
Machine learning
• Machine learning is a type of artificial intelligence (AI)
that provides computers with the ability to learn without
being explicitly programmed.
• Machine learning focuses on
the development of computer
programs that can change
when exposed to new data.
Deep Learning
• Deep Learning is a new area of Machine Learning
research, which has been introduced with the objective
of moving Machine Learning closer to one of its original
goals
• that is concerned with emulating the learning approach
that human beings use to gain certain types of
knowledge.
Why
would you use
Deep Learning?
Gaming
Text Recognition
Translation
Image Recognition
Object recognition
Smart Email Reply
Voice recognition
Self- driving
Android Camera
Demo
• Uses a Google Inception model to classify camera
frames in real-time, displaying the top results in an overlay
on the camera image.
TensorFlow
• TensorFlow™ is an open source software library for
numerical computation and machine learning.
• Especially useful for Deep learning
• For research and production
• Developed by Google Brain Team
TensorFlow Story
• TensorFlow was originally developed by researchers and
engineers working on the Google Brain Team within
Google's Machine Intelligence research organization for
the purposes of conducting machine learning and deep
neural networks research.
• Most Most popular machine learning library.
o Over 32,000 downlowds
Tensorflow Model
• Big idea: Express a numeric computation as a graph.
• Nodes = Mathematical Operations
o Nodes in the graph represent mathematical operations,
• Data Edges = Multi-Dimensional Arrays
(Tensor)
o communicated between them
• Data (Tensors) flow through the graph
Data flow graphs
• Computation is defined
as directed a cyclic graph (GDA)
o Optimize an objective function.
• Graph is defined in high-level
Language (python, C++,Go)
• Graph is compiled and optimized
• Graph is executed (parts or fully)
On level devices (CPU, GPU).
Architecture
• Core in C++
• Front end code python and C++.
• The flexible architecture allows you to deploy
computation to one or more CPUs or GPUs
Portable & scalable
• deploy computation in a desktop, server, or mobile
device with a single API
Programming model
1.Build a graph
a. Graph contains parameter specifications, model architecture, optimization
process, …
b. Somewhere between 5 and 5000 lines
2.Initialize a session
3.Fetch and feed data with Session.run
a. Compilation, optimization, etc. happens at this step — you probably won’t
notice
Programming model
(Build a graph)
• Variables are 0-ary stateful
nodes which output their
current value.
• Placeholders are 0-ary
nodes whose value is fed in at
execution time.
• Mathematical operations:
o MatMul: Multiply two matrix
values.
o Add: Add elementwise (with
broadcasting).
o ReLU: Activate with elementwise
rectified linear function.
Programming model
(Build a graph)
• import tensorflow as tf
b = tf.Variable(tf.zeros((100,)))
W=tf.Variable(tf.random_uniform((784,
100), -1, 1))
x = tf.placeholder(tf.float32, (None,
784))
h_i = tf.nn.relu(tf.matmul(x, W) + b)
Programming model
(Initialize & Run session)
• a session: a binding to a particular execution context
sess.run(fetches, feeds)
Fetches: List of graph nodes. Return the outputs of these
nodes.
Feeds: Dictionary mapping from graph nodes to concrete
values. Specifies the value of each graph node given in
the dictionary.
Programming model
(Build a graph)
import numpy as np
import tensorflow as tf
b = tf.Variable(tf.zeros((100,)))
W = tf.Variable(tf.random_uniform((784, 100),
-1, 1))
x = tf.placeholder(tf.float32, (None, 784))
h_i = tf.nn.relu(tf.matmul(x, W) + b)
-----Initial and Run Session-------
sess = tf.Session()
sess.run(tf.initialize_all_variables())
sess.run(h_i, {x: np.random.random(64, 784)})
Companies using
TensorFlow
https://www.facebook.com/WTM.Cairo/
Engmarwaayad@gmail.com
https://eg.linkedin.com/in/marwa-ayad-mohamed-
0a405215

Tensorflow

  • 2.
    TensorFlow • Purpose: MachineLearning & deep Learning research • Open Source (By Google) • Numerical Computation using data flow graphs
  • 3.
    Agenda • Artificial Intelligence •Machine learning • Deep Learning • Why would you use Deep Learning? • TensorFlow o TensorFlow Story o Tensorflow Model o Data flow graphs o Architecture o Portable & scalable o Programming model o Companies using TensorFlow
  • 5.
    AI & ML& DL
  • 6.
    ArtificialIntelligence • AI orartificial intelligence : is the simulation of human intelligence processes by machines, especially computer systems. • These processes include learning (the information and rules for using the information). • reasoning (using the rules to reach approximate or definite conclusions).
  • 7.
    Machine learning • Machinelearning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. • Machine learning focuses on the development of computer programs that can change when exposed to new data.
  • 8.
    Deep Learning • DeepLearning is a new area of Machine Learning research, which has been introduced with the objective of moving Machine Learning closer to one of its original goals • that is concerned with emulating the learning approach that human beings use to gain certain types of knowledge.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
    Android Camera Demo • Usesa Google Inception model to classify camera frames in real-time, displaying the top results in an overlay on the camera image.
  • 19.
    TensorFlow • TensorFlow™ isan open source software library for numerical computation and machine learning. • Especially useful for Deep learning • For research and production • Developed by Google Brain Team
  • 20.
    TensorFlow Story • TensorFlowwas originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research. • Most Most popular machine learning library. o Over 32,000 downlowds
  • 21.
    Tensorflow Model • Bigidea: Express a numeric computation as a graph. • Nodes = Mathematical Operations o Nodes in the graph represent mathematical operations, • Data Edges = Multi-Dimensional Arrays (Tensor) o communicated between them • Data (Tensors) flow through the graph
  • 22.
    Data flow graphs •Computation is defined as directed a cyclic graph (GDA) o Optimize an objective function. • Graph is defined in high-level Language (python, C++,Go) • Graph is compiled and optimized • Graph is executed (parts or fully) On level devices (CPU, GPU).
  • 23.
    Architecture • Core inC++ • Front end code python and C++. • The flexible architecture allows you to deploy computation to one or more CPUs or GPUs
  • 24.
    Portable & scalable •deploy computation in a desktop, server, or mobile device with a single API
  • 25.
    Programming model 1.Build agraph a. Graph contains parameter specifications, model architecture, optimization process, … b. Somewhere between 5 and 5000 lines 2.Initialize a session 3.Fetch and feed data with Session.run a. Compilation, optimization, etc. happens at this step — you probably won’t notice
  • 26.
    Programming model (Build agraph) • Variables are 0-ary stateful nodes which output their current value. • Placeholders are 0-ary nodes whose value is fed in at execution time. • Mathematical operations: o MatMul: Multiply two matrix values. o Add: Add elementwise (with broadcasting). o ReLU: Activate with elementwise rectified linear function.
  • 27.
    Programming model (Build agraph) • import tensorflow as tf b = tf.Variable(tf.zeros((100,))) W=tf.Variable(tf.random_uniform((784, 100), -1, 1)) x = tf.placeholder(tf.float32, (None, 784)) h_i = tf.nn.relu(tf.matmul(x, W) + b)
  • 28.
    Programming model (Initialize &Run session) • a session: a binding to a particular execution context sess.run(fetches, feeds) Fetches: List of graph nodes. Return the outputs of these nodes. Feeds: Dictionary mapping from graph nodes to concrete values. Specifies the value of each graph node given in the dictionary.
  • 29.
    Programming model (Build agraph) import numpy as np import tensorflow as tf b = tf.Variable(tf.zeros((100,))) W = tf.Variable(tf.random_uniform((784, 100), -1, 1)) x = tf.placeholder(tf.float32, (None, 784)) h_i = tf.nn.relu(tf.matmul(x, W) + b) -----Initial and Run Session------- sess = tf.Session() sess.run(tf.initialize_all_variables()) sess.run(h_i, {x: np.random.random(64, 784)})
  • 30.
  • 31.