SlideShare a Scribd company logo
1 of 19
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

30 分鐘學會實作 Python Feature Selection
30 分鐘學會實作 Python Feature Selection30 分鐘學會實作 Python Feature Selection
30 分鐘學會實作 Python Feature SelectionJames 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 BerkeleyTed 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 TensorFlowSri Ambati
 
TensorFlow in Your Browser
TensorFlow in Your BrowserTensorFlow in Your Browser
TensorFlow in Your BrowserOswald 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 TensorflowNicholas 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 TensorflowOswald Campesato
 
Gentlest Introduction to Tensorflow
Gentlest Introduction to TensorflowGentlest Introduction to Tensorflow
Gentlest Introduction to TensorflowKhor 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 | CloudxLabCloudxLab
 
TensorFlow Tutorial
TensorFlow TutorialTensorFlow Tutorial
TensorFlow TutorialNamHyuk Ahn
 
Gentlest Introduction to Tensorflow - Part 3
Gentlest Introduction to Tensorflow - Part 3Gentlest Introduction to Tensorflow - Part 3
Gentlest Introduction to Tensorflow - Part 3Khor 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 installationmarwa Ayad Mohamed
 
Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0Databricks
 
Introduction to TensorFlow 2
Introduction to TensorFlow 2Introduction to TensorFlow 2
Introduction to TensorFlow 2Oswald Campesato
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningOswald 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

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
 
From Sensing to Decision
From Sensing to DecisionFrom Sensing to Decision
From Sensing to DecisionTzar Umang
 
Docker remote-api
Docker remote-apiDocker remote-api
Docker remote-apiEric Ahn
 
Smart ICT extended
Smart ICT extendedSmart ICT extended
Smart ICT extendedTzar 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 & OpportunitiesAgricultural 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 SecurityAgricultural Training Institute
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric 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-wareTzar Umang
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlowMatthias 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 2016MLconf
 
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
 
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, 2016Chris Fregly
 
Tensorflow internal
Tensorflow internalTensorflow internal
Tensorflow internalHyunghun Cho
 
The Changing Definitions of Public Administration
The Changing Definitions of Public AdministrationThe Changing Definitions of Public Administration
The Changing Definitions of Public AdministrationJo 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-20171117Ganesan Narayanasamy
 
Neural networks with python
Neural networks with pythonNeural networks with python
Neural networks with pythonSimone 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 TensorFlowEtsuji Nakai
 
TensorFlow for IITians
TensorFlow for IITiansTensorFlow for IITians
TensorFlow for IITiansAshish Bansal
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and SparkOswald 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.docxlauracallander
 
The TensorFlow dance craze
The TensorFlow dance crazeThe TensorFlow dance craze
The TensorFlow dance crazeGabriel Hamilton
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torchRiza 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 TensorFlowS N
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3Max Kleiner
 
[신경망기초] 합성곱신경망
[신경망기초] 합성곱신경망[신경망기초] 합성곱신경망
[신경망기초] 합성곱신경망jaypi Ko
 
Theano vs TensorFlow | Edureka
Theano vs TensorFlow | EdurekaTheano vs TensorFlow | Edureka
Theano vs TensorFlow | EdurekaEdureka!
 
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 flowDevatanu 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 itRobert 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.pdfTzar Umang
 
Social engineering The Good and Bad
Social engineering The Good and BadSocial engineering The Good and Bad
Social engineering The Good and BadTzar 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 DataTzar 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 DebateTzar Umang
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go languageTzar Umang
 
Smart ICT Lingayen Presentation
Smart ICT Lingayen PresentationSmart ICT Lingayen Presentation
Smart ICT Lingayen PresentationTzar Umang
 
Formal Concept Analysis
Formal Concept AnalysisFormal Concept Analysis
Formal Concept AnalysisTzar Umang
 
Cloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelCloud computing Disambiguation using Kite Model
Cloud computing Disambiguation using Kite ModelTzar 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 AnalyticsTzar 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

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Recently uploaded (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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