SlideShare a Scribd company logo
INTRODUCTIONTO TENSORFLOW
Google I/O Extended 2016 – Nueva Ecija
07 – 22 – 2016
Tzar C. Umang
23o9 Technology Solutions
GDG BAGUIO
In this Talk
• Introduction to Tensor Flow
• Machine Learning Explained
• Neural Networks Explained
• Codify NN Feed Forward
What is Tensorflow?
• It is Google’s AI Engine
• “TensorFlow is an interface for expressing machine learning
algorithms, and an implementation for executing such algorithms.”
• Technically a Symbolic ML
• Dataflow Framework that compiles with your GPU or Native Code
Machine Learning
• Type of artificial intelligence (AI) that provides computers with the
ability to learn without being explicitly programmed.
Training Data
Dataset Model Learn
Answer
Predict
Artificial Neural Network
• It is a computer system modeled on
human brain
• A family of models inspired by
biological neural networks which are
used to estimate or approximate
functions that can depend on a large
number of inputs and are generally
unknown.
Artificial Neural Network
Basic Human Nervous System Diagram
Brain
Input
Output
Feedback - Memory
Forward Feed
Backward Feed
Artificial Neural Network
• Perceptron
Input
Output
NN Model: Feed Forward
b
Y
Y_pred = Y (Wx * b)
NN Model: Feed Forward
b
Y
Variables are state of nodes which
output their current value which is
retained across multiple execution.
- Gradient Descent, Regression and
etc.
Y_pred = Y (Wx * b)
Control / Bias – variable for
discrimination, preference that
affects Input – Weight
Relationship state.
NN Model: Feed Forward
b
Y
Placeholders are nodes where its
value is fed in at execution time.
Y_pred = Y (Wx * b)
NN Model: Feed Forward
b
Y
Mathematical Operation
W(x) = Multiply Two Matrix or a
Weighted Input
Σ (Add) = Summation elementwise
with broadcasting
Y = Step Function with elementwise
rectified linear function
Y_pred = Y (Wx * b)
Codify: Graph
b
Y
Y_pred = Y (Wx * b)
# %% imports
%matplotlib inline
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
# %% Let's create some toy data
plt.ion()
n_observations = 100
fig, ax = plt.subplots(1, 1)
xs = np.linspace(-3, 3, n_observations)
ys = np.sin(xs) + np.random.uniform(-0.5, 0.5, n_observations)
ax.scatter(xs, ys)
fig.show()
plt.draw()
# %% tf.placeholders for the input and output of the network. Placeholders are
# variables which we need to fill in when we are ready to compute the graph.
X = tf.placeholder(tf.float32)
Y = tf.placeholder(tf.float32)
# %% We will try to optimize min_(W,b) ||(X*w + b) - y||^2
# The `Variable()` constructor requires an initial value for the variable,
# which can be a `Tensor` of any type and shape. The initial value defines the
# type and shape of the variable. After construction, the type and shape of
# the variable are fixed. The value can be changed using one of the assign
# methods.
W = tf.Variable(tf.random_normal([1]), name='weight')
b = tf.Variable(tf.random_normal([1]), name='bias')
Y_pred = tf.add(tf.mul(X, W), b)
Implementation of Graph, Plot / Planes, Variables
Codify – Rendering Graph
b
Y
• We can deploy this graph with a
session: a binding to a particular
execution context (e.g. CPU, GPU)
Y_pred = Y (Wx * b)
Codify - Optimization
b
Y
# %% Loss function will measure the distance between our observations
# and predictions and average over them.
cost = tf.reduce_sum(tf.pow(Y_pred - Y, 2)) / (n_observations - 1)
# %% Use gradient descent to optimize W,b
# Performs a single step in the negative gradient
learning_rate = 0.01
optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)
Y_pred = Y (Wx * b)Optimizing Predictions
Optimizing Learning Rate
Codify - Optimization
b
Y
# %% We create a session to use the graph
n_epochs = 1000
with tf.Session() as sess:
# Here we tell tensorflow that we want to initialize all
# the variables in the graph so we can use them
sess.run(tf.initialize_all_variables())
# Fit all training data
prev_training_cost = 0.0
for epoch_i in range(n_epochs):
for (x, y) in zip(xs, ys):
sess.run(optimizer, feed_dict={X: x, Y: y})
training_cost = sess.run(
cost, feed_dict={X: xs, Y: ys})
print(training_cost)
if epoch_i % 20 == 0:
ax.plot(xs, Y_pred.eval(
feed_dict={X: xs}, session=sess),
'k', alpha=epoch_i / n_epochs)
fig.show()
plt.draw()
# Allow the training to quit if we've reached a minimum
if np.abs(prev_training_cost - training_cost) < 0.000001:
break
prev_training_cost = training_cost
fig.show()
Y_pred = Y (Wx * b)
Implementation of Session to make the model
ready to be fed with data and show results
Codify - Result
b
Y
Y_pred = Y (Wx * b)
Gradient Descent is used to optimize W, b which resulted
to this Decision Vector Plot
Basic Flow
1.Build a graph
a.Graph contains parameter specifications, model architecture, optimization
process
2.Optimize Predictions, Loss Functions and Learning
3.Initialize a session
4.Fetch and feed data with Session.run
a.Compilation, optimization, visualization
Tensorflow Resources
1.Main Site https://www.tensorflow.org/
2.Tutorials
a. https://github.com/nlintz/TensorFlow-Tutorials/
It is highly recommended to use Dockers when running Tensorflow or
doing some test on your own machine…
Thank you!!!
Tzar C. Umang
23o9 Technology Solutions of Tzar Enterprises
GDG Baguio
tzarumang@gmail.com

More Related Content

What's hot

TensorFlow
TensorFlowTensorFlow
TensorFlow
jirimaterna
 
30 分鐘學會實作 Python Feature Selection
30 分鐘學會實作 Python Feature Selection30 分鐘學會實作 Python Feature Selection
30 分鐘學會實作 Python Feature Selection
James Huang
 
Introduction to TensorFlow, by Machine Learning at Berkeley
Introduction to TensorFlow, by Machine Learning at BerkeleyIntroduction to TensorFlow, by Machine Learning at Berkeley
Introduction to TensorFlow, by Machine Learning at Berkeley
Ted Xiao
 
TensorFlow 深度學習快速上手班--電腦視覺應用
TensorFlow 深度學習快速上手班--電腦視覺應用TensorFlow 深度學習快速上手班--電腦視覺應用
TensorFlow 深度學習快速上手班--電腦視覺應用
Mark Chang
 
Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...
Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...
Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...
Altoros
 
Introduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlowIntroduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlow
Sri Ambati
 
TensorFlow in Your Browser
TensorFlow in Your BrowserTensorFlow in Your Browser
TensorFlow in Your Browser
Oswald Campesato
 
Explanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expertExplanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expert
홍배 김
 
Introduction to Neural Networks in Tensorflow
Introduction to Neural Networks in TensorflowIntroduction to Neural Networks in Tensorflow
Introduction to Neural Networks in Tensorflow
Nicholas McClure
 
Introduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and TensorflowIntroduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and Tensorflow
Oswald Campesato
 
Gentlest Introduction to Tensorflow
Gentlest Introduction to TensorflowGentlest Introduction to Tensorflow
Gentlest Introduction to Tensorflow
Khor SoonHin
 
Introduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLab
Introduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLabIntroduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLab
Introduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLab
CloudxLab
 
H2 o berkeleydltf
H2 o berkeleydltfH2 o berkeleydltf
H2 o berkeleydltf
Oswald Campesato
 
TensorFlow Tutorial
TensorFlow TutorialTensorFlow Tutorial
TensorFlow Tutorial
NamHyuk Ahn
 
Gentlest Introduction to Tensorflow - Part 3
Gentlest Introduction to Tensorflow - Part 3Gentlest Introduction to Tensorflow - Part 3
Gentlest Introduction to Tensorflow - Part 3
Khor SoonHin
 
Working with tf.data (TF 2)
Working with tf.data (TF 2)Working with tf.data (TF 2)
Working with tf.data (TF 2)
Oswald Campesato
 
Tensorflow windows installation
Tensorflow windows installationTensorflow windows installation
Tensorflow windows installation
marwa Ayad Mohamed
 
Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0
Databricks
 
Introduction to TensorFlow 2
Introduction to TensorFlow 2Introduction to TensorFlow 2
Introduction to TensorFlow 2
Oswald Campesato
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep Learning
Oswald Campesato
 

What's hot (20)

TensorFlow
TensorFlowTensorFlow
TensorFlow
 
30 分鐘學會實作 Python Feature Selection
30 分鐘學會實作 Python Feature Selection30 分鐘學會實作 Python Feature Selection
30 分鐘學會實作 Python Feature Selection
 
Introduction to TensorFlow, by Machine Learning at Berkeley
Introduction to TensorFlow, by Machine Learning at BerkeleyIntroduction to TensorFlow, by Machine Learning at Berkeley
Introduction to TensorFlow, by Machine Learning at Berkeley
 
TensorFlow 深度學習快速上手班--電腦視覺應用
TensorFlow 深度學習快速上手班--電腦視覺應用TensorFlow 深度學習快速上手班--電腦視覺應用
TensorFlow 深度學習快速上手班--電腦視覺應用
 
Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...
Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...
Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Im...
 
Introduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlowIntroduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlow
 
TensorFlow in Your Browser
TensorFlow in Your BrowserTensorFlow in Your Browser
TensorFlow in Your Browser
 
Explanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expertExplanation on Tensorflow example -Deep mnist for expert
Explanation on Tensorflow example -Deep mnist for expert
 
Introduction to Neural Networks in Tensorflow
Introduction to Neural Networks in TensorflowIntroduction to Neural Networks in Tensorflow
Introduction to Neural Networks in Tensorflow
 
Introduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and TensorflowIntroduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and Tensorflow
 
Gentlest Introduction to Tensorflow
Gentlest Introduction to TensorflowGentlest Introduction to Tensorflow
Gentlest Introduction to Tensorflow
 
Introduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLab
Introduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLabIntroduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLab
Introduction To TensorFlow | Deep Learning Using TensorFlow | CloudxLab
 
H2 o berkeleydltf
H2 o berkeleydltfH2 o berkeleydltf
H2 o berkeleydltf
 
TensorFlow Tutorial
TensorFlow TutorialTensorFlow Tutorial
TensorFlow Tutorial
 
Gentlest Introduction to Tensorflow - Part 3
Gentlest Introduction to Tensorflow - Part 3Gentlest Introduction to Tensorflow - Part 3
Gentlest Introduction to Tensorflow - Part 3
 
Working with tf.data (TF 2)
Working with tf.data (TF 2)Working with tf.data (TF 2)
Working with tf.data (TF 2)
 
Tensorflow windows installation
Tensorflow windows installationTensorflow windows installation
Tensorflow windows installation
 
Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0
 
Introduction to TensorFlow 2
Introduction to TensorFlow 2Introduction to TensorFlow 2
Introduction to TensorFlow 2
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep Learning
 

Viewers also liked

TensorFlow
TensorFlowTensorFlow
TensorFlow
Sang-Houn Choi
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow
Jen Aman
 
Kanban
KanbanKanban
Kanban
Tzar Umang
 
From Sensing to Decision
From Sensing to DecisionFrom Sensing to Decision
From Sensing to Decision
Tzar Umang
 
Docker remote-api
Docker remote-apiDocker remote-api
Docker remote-api
Eric Ahn
 
Smart ICT extended
Smart ICT extendedSmart ICT extended
Smart ICT extended
Tzar Umang
 
Rice Farming in the Philippines: Some Facts & Opportunities
Rice Farming in the Philippines: Some Facts & OpportunitiesRice Farming in the Philippines: Some Facts & Opportunities
Rice Farming in the Philippines: Some Facts & Opportunities
Agricultural Training Institute
 
Rice Crop Manager: Innovative ICT Approach for Food Security
Rice Crop Manager: Innovative ICT Approach for Food SecurityRice Crop Manager: Innovative ICT Approach for Food Security
Rice Crop Manager: Innovative ICT Approach for Food Security
Agricultural Training Institute
 
ICT : The Organization and Work
ICT : The Organization and WorkICT : The Organization and Work
ICT : The Organization and Work
Jo Balucanag - Bitonio
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
Eric Ahn
 
Cloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-wareCloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-ware
Tzar Umang
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlow
Matthias Feys
 
Kaz Sato, Evangelist, Google at MLconf ATL 2016
Kaz Sato, Evangelist, Google at MLconf ATL 2016Kaz Sato, Evangelist, Google at MLconf ATL 2016
Kaz Sato, Evangelist, Google at MLconf ATL 2016
MLconf
 
ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...
ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...
ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...
IAALD Community
 
Precision Agriculture and ICT in The Netherlands
Precision Agriculture and ICT in The NetherlandsPrecision Agriculture and ICT in The Netherlands
Precision Agriculture and ICT in The NetherlandsSjaak Wolfert
 
Smart Cities
Smart CitiesSmart Cities
Smart Cities
Tzar Umang
 
Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016
Chris Fregly
 
Tensorflow internal
Tensorflow internalTensorflow internal
Tensorflow internal
Hyunghun Cho
 
The Changing Definitions of Public Administration
The Changing Definitions of Public AdministrationThe Changing Definitions of Public Administration
The Changing Definitions of Public Administration
Jo Balucanag - Bitonio
 

Viewers also liked (20)

TensorFlow
TensorFlowTensorFlow
TensorFlow
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow
 
Kanban
KanbanKanban
Kanban
 
From Sensing to Decision
From Sensing to DecisionFrom Sensing to Decision
From Sensing to Decision
 
Docker remote-api
Docker remote-apiDocker remote-api
Docker remote-api
 
Smart ICT extended
Smart ICT extendedSmart ICT extended
Smart ICT extended
 
Rice Farming in the Philippines: Some Facts & Opportunities
Rice Farming in the Philippines: Some Facts & OpportunitiesRice Farming in the Philippines: Some Facts & Opportunities
Rice Farming in the Philippines: Some Facts & Opportunities
 
Rice Crop Manager: Innovative ICT Approach for Food Security
Rice Crop Manager: Innovative ICT Approach for Food SecurityRice Crop Manager: Innovative ICT Approach for Food Security
Rice Crop Manager: Innovative ICT Approach for Food Security
 
ICT : The Organization and Work
ICT : The Organization and WorkICT : The Organization and Work
ICT : The Organization and Work
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 
Cloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-wareCloud security From Infrastructure to People-ware
Cloud security From Infrastructure to People-ware
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlow
 
Kaz Sato, Evangelist, Google at MLconf ATL 2016
Kaz Sato, Evangelist, Google at MLconf ATL 2016Kaz Sato, Evangelist, Google at MLconf ATL 2016
Kaz Sato, Evangelist, Google at MLconf ATL 2016
 
ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...
ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...
ICT Initiatives of the Philippines for Sustained Agricultural Development: Th...
 
Precision Agriculture and ICT in The Netherlands
Precision Agriculture and ICT in The NetherlandsPrecision Agriculture and ICT in The Netherlands
Precision Agriculture and ICT in The Netherlands
 
ICT Implementation in the Philippines
ICT Implementation in the PhilippinesICT Implementation in the Philippines
ICT Implementation in the Philippines
 
Smart Cities
Smart CitiesSmart Cities
Smart Cities
 
Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016
 
Tensorflow internal
Tensorflow internalTensorflow internal
Tensorflow internal
 
The Changing Definitions of Public Administration
The Changing Definitions of Public AdministrationThe Changing Definitions of Public Administration
The Changing Definitions of Public Administration
 

Similar to Introduction to Tensorflow

Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
ETS Asset Management Factory
 
Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117
Ganesan Narayanasamy
 
Neural networks with python
Neural networks with pythonNeural networks with python
Neural networks with python
Simone Piunno
 
Introduction to Tensor Flow for Optical Character Recognition (OCR)
Introduction to Tensor Flow for Optical Character Recognition (OCR)Introduction to Tensor Flow for Optical Character Recognition (OCR)
Introduction to Tensor Flow for Optical Character Recognition (OCR)
Vincenzo Santopietro
 
Introducton to Convolutional Nerural Network with TensorFlow
Introducton to Convolutional Nerural Network with TensorFlowIntroducton to Convolutional Nerural Network with TensorFlow
Introducton to Convolutional Nerural Network with TensorFlow
Etsuji Nakai
 
TensorFlow for IITians
TensorFlow for IITiansTensorFlow for IITians
TensorFlow for IITians
Ashish Bansal
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and Spark
Oswald Campesato
 
Need help filling out the missing sections of this code- the sections.docx
Need help filling out the missing sections of this code- the sections.docxNeed help filling out the missing sections of this code- the sections.docx
Need help filling out the missing sections of this code- the sections.docx
lauracallander
 
The TensorFlow dance craze
The TensorFlow dance crazeThe TensorFlow dance craze
The TensorFlow dance craze
Gabriel Hamilton
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torch
Riza Fahmi
 
Language translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowLanguage translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlow
S N
 
Tensorflow
TensorflowTensorflow
Tensorflow
marwa Ayad Mohamed
 
Matlab Nn Intro
Matlab Nn IntroMatlab Nn Intro
Matlab Nn Intro
Imthias Ahamed
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3
Max Kleiner
 
[신경망기초] 합성곱신경망
[신경망기초] 합성곱신경망[신경망기초] 합성곱신경망
[신경망기초] 합성곱신경망
jaypi Ko
 
Theano vs TensorFlow | Edureka
Theano vs TensorFlow | EdurekaTheano vs TensorFlow | Edureka
Theano vs TensorFlow | Edureka
Edureka!
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
Databricks
 
Font classification with 5 deep learning models using tensor flow
Font classification with 5 deep learning models using tensor flowFont classification with 5 deep learning models using tensor flow
Font classification with 5 deep learning models using tensor flow
Devatanu Banerjee
 
What is TensorFlow and why do we use it
What is TensorFlow and why do we use itWhat is TensorFlow and why do we use it
What is TensorFlow and why do we use it
Robert John
 
Machine Learning and Go. Go!
Machine Learning and Go. Go!Machine Learning and Go. Go!
Machine Learning and Go. Go!
Diana Ortega
 

Similar to Introduction to Tensorflow (20)

Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
 
Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117
 
Neural networks with python
Neural networks with pythonNeural networks with python
Neural networks with python
 
Introduction to Tensor Flow for Optical Character Recognition (OCR)
Introduction to Tensor Flow for Optical Character Recognition (OCR)Introduction to Tensor Flow for Optical Character Recognition (OCR)
Introduction to Tensor Flow for Optical Character Recognition (OCR)
 
Introducton to Convolutional Nerural Network with TensorFlow
Introducton to Convolutional Nerural Network with TensorFlowIntroducton to Convolutional Nerural Network with TensorFlow
Introducton to Convolutional Nerural Network with TensorFlow
 
TensorFlow for IITians
TensorFlow for IITiansTensorFlow for IITians
TensorFlow for IITians
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and Spark
 
Need help filling out the missing sections of this code- the sections.docx
Need help filling out the missing sections of this code- the sections.docxNeed help filling out the missing sections of this code- the sections.docx
Need help filling out the missing sections of this code- the sections.docx
 
The TensorFlow dance craze
The TensorFlow dance crazeThe TensorFlow dance craze
The TensorFlow dance craze
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torch
 
Language translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowLanguage translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlow
 
Tensorflow
TensorflowTensorflow
Tensorflow
 
Matlab Nn Intro
Matlab Nn IntroMatlab Nn Intro
Matlab Nn Intro
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3
 
[신경망기초] 합성곱신경망
[신경망기초] 합성곱신경망[신경망기초] 합성곱신경망
[신경망기초] 합성곱신경망
 
Theano vs TensorFlow | Edureka
Theano vs TensorFlow | EdurekaTheano vs TensorFlow | Edureka
Theano vs TensorFlow | Edureka
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
 
Font classification with 5 deep learning models using tensor flow
Font classification with 5 deep learning models using tensor flowFont classification with 5 deep learning models using tensor flow
Font classification with 5 deep learning models using tensor flow
 
What is TensorFlow and why do we use it
What is TensorFlow and why do we use itWhat is TensorFlow and why do we use it
What is TensorFlow and why do we use it
 
Machine Learning and Go. Go!
Machine Learning and Go. Go!Machine Learning and Go. Go!
Machine Learning and Go. Go!
 

More from Tzar Umang

Tzar-Resume-2018.pdf
Tzar-Resume-2018.pdfTzar-Resume-2018.pdf
Tzar-Resume-2018.pdf
Tzar Umang
 
Social engineering The Good and Bad
Social engineering The Good and BadSocial engineering The Good and Bad
Social engineering The Good and Bad
Tzar Umang
 
A Different Perspective on Business with Social Data
A Different Perspective on Business with Social DataA Different Perspective on Business with Social Data
A Different Perspective on Business with Social Data
Tzar Umang
 
Social Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential DebateSocial Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential Debate
Tzar Umang
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go language
Tzar Umang
 
Smart ICT Lingayen Presentation
Smart ICT Lingayen PresentationSmart ICT Lingayen Presentation
Smart ICT Lingayen Presentation
Tzar Umang
 
Formal Concept Analysis
Formal Concept AnalysisFormal Concept Analysis
Formal Concept Analysis
Tzar Umang
 
Cloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelCloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite Model
Tzar Umang
 
Scrum
ScrumScrum
Scrum
Tzar Umang
 
Business intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data AnalyticsBusiness intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data Analytics
Tzar Umang
 

More from Tzar Umang (10)

Tzar-Resume-2018.pdf
Tzar-Resume-2018.pdfTzar-Resume-2018.pdf
Tzar-Resume-2018.pdf
 
Social engineering The Good and Bad
Social engineering The Good and BadSocial engineering The Good and Bad
Social engineering The Good and Bad
 
A Different Perspective on Business with Social Data
A Different Perspective on Business with Social DataA Different Perspective on Business with Social Data
A Different Perspective on Business with Social Data
 
Social Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential DebateSocial Media Analytics for the 3rd and Final Presidential Debate
Social Media Analytics for the 3rd and Final Presidential Debate
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go language
 
Smart ICT Lingayen Presentation
Smart ICT Lingayen PresentationSmart ICT Lingayen Presentation
Smart ICT Lingayen Presentation
 
Formal Concept Analysis
Formal Concept AnalysisFormal Concept Analysis
Formal Concept Analysis
 
Cloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelCloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite Model
 
Scrum
ScrumScrum
Scrum
 
Business intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data AnalyticsBusiness intelligence for SMEs with Data Analytics
Business intelligence for SMEs with Data Analytics
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

Introduction to Tensorflow

  • 1. INTRODUCTIONTO TENSORFLOW Google I/O Extended 2016 – Nueva Ecija 07 – 22 – 2016 Tzar C. Umang 23o9 Technology Solutions GDG BAGUIO
  • 2. In this Talk • Introduction to Tensor Flow • Machine Learning Explained • Neural Networks Explained • Codify NN Feed Forward
  • 3. What is Tensorflow? • It is Google’s AI Engine • “TensorFlow is an interface for expressing machine learning algorithms, and an implementation for executing such algorithms.” • Technically a Symbolic ML • Dataflow Framework that compiles with your GPU or Native Code
  • 4. Machine Learning • Type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Training Data Dataset Model Learn Answer Predict
  • 5. Artificial Neural Network • It is a computer system modeled on human brain • A family of models inspired by biological neural networks which are used to estimate or approximate functions that can depend on a large number of inputs and are generally unknown.
  • 6. Artificial Neural Network Basic Human Nervous System Diagram Brain Input Output Feedback - Memory Forward Feed Backward Feed
  • 7. Artificial Neural Network • Perceptron Input Output
  • 8. NN Model: Feed Forward b Y Y_pred = Y (Wx * b)
  • 9. NN Model: Feed Forward b Y Variables are state of nodes which output their current value which is retained across multiple execution. - Gradient Descent, Regression and etc. Y_pred = Y (Wx * b) Control / Bias – variable for discrimination, preference that affects Input – Weight Relationship state.
  • 10. NN Model: Feed Forward b Y Placeholders are nodes where its value is fed in at execution time. Y_pred = Y (Wx * b)
  • 11. NN Model: Feed Forward b Y Mathematical Operation W(x) = Multiply Two Matrix or a Weighted Input Σ (Add) = Summation elementwise with broadcasting Y = Step Function with elementwise rectified linear function Y_pred = Y (Wx * b)
  • 12. Codify: Graph b Y Y_pred = Y (Wx * b) # %% imports %matplotlib inline import numpy as np import tensorflow as tf import matplotlib.pyplot as plt # %% Let's create some toy data plt.ion() n_observations = 100 fig, ax = plt.subplots(1, 1) xs = np.linspace(-3, 3, n_observations) ys = np.sin(xs) + np.random.uniform(-0.5, 0.5, n_observations) ax.scatter(xs, ys) fig.show() plt.draw() # %% tf.placeholders for the input and output of the network. Placeholders are # variables which we need to fill in when we are ready to compute the graph. X = tf.placeholder(tf.float32) Y = tf.placeholder(tf.float32) # %% We will try to optimize min_(W,b) ||(X*w + b) - y||^2 # The `Variable()` constructor requires an initial value for the variable, # which can be a `Tensor` of any type and shape. The initial value defines the # type and shape of the variable. After construction, the type and shape of # the variable are fixed. The value can be changed using one of the assign # methods. W = tf.Variable(tf.random_normal([1]), name='weight') b = tf.Variable(tf.random_normal([1]), name='bias') Y_pred = tf.add(tf.mul(X, W), b) Implementation of Graph, Plot / Planes, Variables
  • 13. Codify – Rendering Graph b Y • We can deploy this graph with a session: a binding to a particular execution context (e.g. CPU, GPU) Y_pred = Y (Wx * b)
  • 14. Codify - Optimization b Y # %% Loss function will measure the distance between our observations # and predictions and average over them. cost = tf.reduce_sum(tf.pow(Y_pred - Y, 2)) / (n_observations - 1) # %% Use gradient descent to optimize W,b # Performs a single step in the negative gradient learning_rate = 0.01 optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost) Y_pred = Y (Wx * b)Optimizing Predictions Optimizing Learning Rate
  • 15. Codify - Optimization b Y # %% We create a session to use the graph n_epochs = 1000 with tf.Session() as sess: # Here we tell tensorflow that we want to initialize all # the variables in the graph so we can use them sess.run(tf.initialize_all_variables()) # Fit all training data prev_training_cost = 0.0 for epoch_i in range(n_epochs): for (x, y) in zip(xs, ys): sess.run(optimizer, feed_dict={X: x, Y: y}) training_cost = sess.run( cost, feed_dict={X: xs, Y: ys}) print(training_cost) if epoch_i % 20 == 0: ax.plot(xs, Y_pred.eval( feed_dict={X: xs}, session=sess), 'k', alpha=epoch_i / n_epochs) fig.show() plt.draw() # Allow the training to quit if we've reached a minimum if np.abs(prev_training_cost - training_cost) < 0.000001: break prev_training_cost = training_cost fig.show() Y_pred = Y (Wx * b) Implementation of Session to make the model ready to be fed with data and show results
  • 16. Codify - Result b Y Y_pred = Y (Wx * b) Gradient Descent is used to optimize W, b which resulted to this Decision Vector Plot
  • 17. Basic Flow 1.Build a graph a.Graph contains parameter specifications, model architecture, optimization process 2.Optimize Predictions, Loss Functions and Learning 3.Initialize a session 4.Fetch and feed data with Session.run a.Compilation, optimization, visualization
  • 18. Tensorflow Resources 1.Main Site https://www.tensorflow.org/ 2.Tutorials a. https://github.com/nlintz/TensorFlow-Tutorials/ It is highly recommended to use Dockers when running Tensorflow or doing some test on your own machine…
  • 19. Thank you!!! Tzar C. Umang 23o9 Technology Solutions of Tzar Enterprises GDG Baguio tzarumang@gmail.com