SlideShare une entreprise Scribd logo
1  sur  41
Deep Learning with
TensorFlow
Understanding Tensors, Computation Graphs, Images, Text
Viswanath Puttagunta
Technical Program Manager, Linaro
Vish Puttagunta
Technical Program Manager,
Linaro
Statistics/Signal Processing in
Images, Audio, RF
Data Analysis and Machine
Learning on ARM SoCs.
Leading collaboration in ARMTM
Ecosystem
Enterprise, Mobile, Home,
Networking, IoT
Built on Open Source
Goals
Basics behind Neural Networks
Picturing Neural Networks. Understand the operations.
Representing Neural Networks using Tensors and Computation Graphs
Vision (MNIST), Text (Word2Vec)
TensorFlow
Gives you good tools to build a Neural Network Model.
Some basic models… but Google's secret sauce still inside Google :)
The Basics
Linear Regression
Weight / Bias
Cost Function
Gradient Descent to optimize a cost function
Logistic Regression
Neuron Activation
Linear Regression
Objective: Fit line/curve to minimize a cost function
Line has "Weight / Slope" and "Bias / y-
Cost Function, Gradient Descent
Source: https://www.youtube.com/watch?v=SqA6TujbmWw&list=PLE6Wd9FR--Ecf_5nCbnSQMHqORpiChfJf&index=16
https://youtu.be/WnqQrPNYz5Q?list=PLaXDtXvwY-oDvedS3f4HW0b4KxqpJ_imw&t=284
● Cost Function, J(𝞡)
○ Weight / Slope: 𝞡1
○ Bias / y-intercept: 𝞡2
● Gradient Descent
○ Go down to the lowest
point in the cost function in
small steps
BIG IDEA
● Starts with some Weights & Biases
● Define a Cost Function
● Optimize the Cost function by doing
some sort of Gradient Descent
● Lots of Help from TensorFlow.
Weight, Bias in 0,1 Dimensions
Neuron and Activation Function
BIG IDEAS
● Only one of the Neurons will fire at a time (value shoots greater than 0.5)
● Which neuron depends on "x", Weights, Biases
● Rest of neurons will not fire. (value much less than 0.5)
● Outcomes are between 0 and 1 → Probabilities (all outputs add to one)
○ → Good for classification
Neuron and Activation Function
BIG IDEAS
● Only one of the Neurons will fire at a time (value shoots greater than 0.5)
● Which neuron depends on "x", Weights, Biases
● Rest of neurons will not fire. (value much less than 0.5)
● Outcomes are between 0 and 1 → Probabilities (all outputs add to one)
○ → Good for classification
Neuron and Activation Function
BIG IDEAS
● Only one of the Neurons will fire at a time (value shoots greater than 0.5)
● Which neuron depends on "x", Weights, Biases
● Rest of neurons will not fire. (value much less than 0.5)
● Outcomes are between 0 and 1 → Probabilities (all outputs add to one)
○ → Good for classification
Same picture: Less mess, more classes
Simple Neural Network for MNIST
Source: https://www.tensorflow.org/versions/r0.7/tutorials/mnist/beginners/index.html
Simple Neural Network for MNIST
Weights actually Mean
something!!
Weights/Bias → Evidence → Probability
BIG IDEAS
● After proper Gradient Descent, Weights Generalize well.
● Correlation operation corresponds to "Evidence"
● Then do softmax(evidence) and you will get Probability(x 𝞊 specific
class)
Source: https://www.tensorflow.org/versions/r0.7/tutorials/mnist/beginners/index.html
MNIST Simple: Operations / Dimensions
● input image(x)
○ 28x28 matrix → 1x784
○ each element type: 0 or 1
● Weights (W0, W1…. W9)
○ 28x28 matrix → 1x784
○ each element: float(-1, +1)
● Eg: W1Ⓧx (Correlation)
○ Multiply Accumulate!
■ matmul(W, xT)
○ single float (-1, +1)
● Biases (B0, B1…. B9)
○ single floating pt (-1, +1)
● Evidence: Eg: W1Ⓧx + B1
○ single floating pt (-
784.0,+784.0)
● Probability
○ single float (0,1)
● Real output (Y), Predicted
o/p(Y^)
○ 1x10 matrix
○ each is 0 or 1
MNIST Simple: In TensorFlow
MNIST Simple: In TensorFlow
MNIST Simple: Back-Propagation
MNIST using Convolution Neural Network
Convolution: Signal/Image processing
Source
Convolution: Signal/Image Processing
Source
Weight, Bias in 0,1 Dimensions
MNIST: Using CNN
MNIST: Using CNN
MNIST: Using CNN
MNIST: Using CNN
Text Analytics
Word2Vec
Thinking of words and as vectors
Sequence-to-Sequence models
Recurrent Neural Networks (LSTM)
Understanding sequence of words
"Don't like" is closer to "hate"
Words as vectors (Embeddings)
list → [human, cow] → int list [0, 1] → embeddings [(2,2), (4,0)]
Sequence of words as vectors!
Projections/Dimensionality Reduction (PCA/TSNE)
Projections/Dimensionality Reduction (PCA/TSNE)
source: https://www.youtube.com/watch?v=VINCQghQRuM
word2vec: using Neural Network
word2vec: using Neural Network
Note:
Only trying to understand
relationship between
words and understand
best way to vectorize
words!
Not really keen on
sequence of words! (Later
RNN)
word2vec: using NN (softmax classifier)
Realize wv
could easily
be w50000
words in
vocabulary!
word2vec: using NN (softmax classifier-pitfall)
Too many
computations for
every set of inputs
(Eg: Classifying
across 50,000
classes if you
vocabulary size is
50,000)
word2vec: using Noise Classifier
Big Idea: Instead of trying to move every word(vector) by little bit in each step
Move few random words (~16) at a time
If you have lots of sentences, you should be good
word2vec: Compute Graph
word2vec Code Walk Through
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/exa
mples/tutorials/word2vec/word2vec_basic.py
Summary
TensorFlow was simple to install (Ubuntu 14.04)
sudo apt-get install python-pip python-dev
sudo pip install --upgrade
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-
0.8.0rc0-cp27-none-linux_x86_64.whl
Tutorials are 'relatively' easy to follow
Good pointers to papers and blogs
Would like to hear Google's perspective on
References
Convolution Neural Network: https://youtu.be/n6hpQwq7Inw
TensorFlow Tutorials: https://www.tensorflow.org/versions/r0.7/tutorials/index.html
Khan Academy (Linear algebra): https://www.khanacademy.org/
LSTM, Text Analytics: Alec Ratford, Indico
https://www.youtube.com/watch?v=VINCQghQRuM
Current trends in Deep Learning (Andrew Ng, Baidu)
https://www.youtube.com/watch?v=O0VN0pGgBZM

Contenu connexe

Tendances

TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...
Simplilearn
 
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
Simplilearn
 

Tendances (20)

TensorFlow and Keras: An Overview
TensorFlow and Keras: An OverviewTensorFlow and Keras: An Overview
TensorFlow and Keras: An Overview
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNet
 
Distributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflowDistributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflow
 
Deep Learning for AI (2)
Deep Learning for AI (2)Deep Learning for AI (2)
Deep Learning for AI (2)
 
Neural Networks with Google TensorFlow
Neural Networks with Google TensorFlowNeural Networks with Google TensorFlow
Neural Networks with Google TensorFlow
 
TensorFlow Dev Summit 2018 Extended: TensorFlow Eager Execution
TensorFlow Dev Summit 2018 Extended: TensorFlow Eager ExecutionTensorFlow Dev Summit 2018 Extended: TensorFlow Eager Execution
TensorFlow Dev Summit 2018 Extended: TensorFlow Eager Execution
 
Tensorflow presentation
Tensorflow presentationTensorflow presentation
Tensorflow presentation
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural Networks
 
Scaling Deep Learning with MXNet
Scaling Deep Learning with MXNetScaling Deep Learning with MXNet
Scaling Deep Learning with MXNet
 
Angular and Deep Learning
Angular and Deep LearningAngular and Deep Learning
Angular and Deep Learning
 
Neural networks and google tensor flow
Neural networks and google tensor flowNeural networks and google tensor flow
Neural networks and google tensor flow
 
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...
 
Introduction to Deep Learning with Python
Introduction to Deep Learning with PythonIntroduction to Deep Learning with Python
Introduction to Deep Learning with Python
 
AWS re:Invent 2016: Using MXNet for Recommendation Modeling at Scale (MAC306)
AWS re:Invent 2016: Using MXNet for Recommendation Modeling at Scale (MAC306)AWS re:Invent 2016: Using MXNet for Recommendation Modeling at Scale (MAC306)
AWS re:Invent 2016: Using MXNet for Recommendation Modeling at Scale (MAC306)
 
Keras on tensorflow in R & Python
Keras on tensorflow in R & PythonKeras on tensorflow in R & Python
Keras on tensorflow in R & Python
 
TensorFlow
TensorFlowTensorFlow
TensorFlow
 
Deep learning intro
Deep learning introDeep learning intro
Deep learning intro
 
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Deep Learning: Chapter 11 Practical Methodology
Deep Learning: Chapter 11 Practical MethodologyDeep Learning: Chapter 11 Practical Methodology
Deep Learning: Chapter 11 Practical Methodology
 

Similaire à Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Images, and Text

Lect1_Threshold_Logic_Unit lecture 1 - ANN
Lect1_Threshold_Logic_Unit  lecture 1 - ANNLect1_Threshold_Logic_Unit  lecture 1 - ANN
Lect1_Threshold_Logic_Unit lecture 1 - ANN
MostafaHazemMostafaa
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
Databricks
 

Similaire à Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Images, and Text (20)

Neural networks and deep learning
Neural networks and deep learningNeural networks and deep learning
Neural networks and deep learning
 
Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)
 
Java and Deep Learning
Java and Deep LearningJava and Deep Learning
Java and Deep Learning
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep Learning
 
TypeScript and Deep Learning
TypeScript and Deep LearningTypeScript and Deep Learning
TypeScript and Deep Learning
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep Learning
 
Android and Deep Learning
Android and Deep LearningAndroid and Deep Learning
Android and Deep Learning
 
Lect1_Threshold_Logic_Unit lecture 1 - ANN
Lect1_Threshold_Logic_Unit  lecture 1 - ANNLect1_Threshold_Logic_Unit  lecture 1 - ANN
Lect1_Threshold_Logic_Unit lecture 1 - ANN
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 
[Revised] Intro to CNN
[Revised] Intro to CNN[Revised] Intro to CNN
[Revised] Intro to CNN
 
Deep learning tutorial 9/2019
Deep learning tutorial 9/2019Deep learning tutorial 9/2019
Deep learning tutorial 9/2019
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Deep Learning and Watson Studio
Deep Learning and Watson StudioDeep Learning and Watson Studio
Deep Learning and Watson Studio
 
deepnet-lourentzou.ppt
deepnet-lourentzou.pptdeepnet-lourentzou.ppt
deepnet-lourentzou.ppt
 
Automatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face RecognitionAutomatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face Recognition
 
Deep learning
Deep learningDeep learning
Deep learning
 
Deep Learning and TensorFlow
Deep Learning and TensorFlowDeep Learning and TensorFlow
Deep Learning and TensorFlow
 
Deep learning algorithms
Deep learning algorithmsDeep learning algorithms
Deep learning algorithms
 
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in RUnderstanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
 
Neural Network
Neural NetworkNeural Network
Neural Network
 

Plus de Altoros

Plus de Altoros (20)

Maturing with Kubernetes
Maturing with KubernetesMaturing with Kubernetes
Maturing with Kubernetes
 
Kubernetes Platform Readiness and Maturity Assessment
Kubernetes Platform Readiness and Maturity AssessmentKubernetes Platform Readiness and Maturity Assessment
Kubernetes Platform Readiness and Maturity Assessment
 
Journey Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment MaturityJourney Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment Maturity
 
SGX: Improving Privacy, Security, and Trust Across Blockchain Networks
SGX: Improving Privacy, Security, and Trust Across Blockchain NetworksSGX: Improving Privacy, Security, and Trust Across Blockchain Networks
SGX: Improving Privacy, Security, and Trust Across Blockchain Networks
 
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
 
A Zero-Knowledge Proof: Improving Privacy on a Blockchain
A Zero-Knowledge Proof:  Improving Privacy on a BlockchainA Zero-Knowledge Proof:  Improving Privacy on a Blockchain
A Zero-Knowledge Proof: Improving Privacy on a Blockchain
 
Crap. Your Big Data Kitchen Is Broken.
Crap. Your Big Data Kitchen Is Broken.Crap. Your Big Data Kitchen Is Broken.
Crap. Your Big Data Kitchen Is Broken.
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and Kubernetes
 
Distributed Ledger Technology for Over-the-Counter Trading
Distributed Ledger Technology for Over-the-Counter TradingDistributed Ledger Technology for Over-the-Counter Trading
Distributed Ledger Technology for Over-the-Counter Trading
 
5-Step Deployment of Hyperledger Fabric on Multiple Nodes
5-Step Deployment of Hyperledger Fabric on Multiple Nodes5-Step Deployment of Hyperledger Fabric on Multiple Nodes
5-Step Deployment of Hyperledger Fabric on Multiple Nodes
 
Deploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with KubesprayDeploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with Kubespray
 
UAA for Kubernetes
UAA for KubernetesUAA for Kubernetes
UAA for Kubernetes
 
Troubleshooting .NET Applications on Cloud Foundry
Troubleshooting .NET Applications on Cloud FoundryTroubleshooting .NET Applications on Cloud Foundry
Troubleshooting .NET Applications on Cloud Foundry
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCFContinuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
 
How to Never Leave Your Deployment Unattended
How to Never Leave Your Deployment UnattendedHow to Never Leave Your Deployment Unattended
How to Never Leave Your Deployment Unattended
 
Cloud Foundry Monitoring How-To: Collecting Metrics and Logs
Cloud Foundry Monitoring How-To: Collecting Metrics and LogsCloud Foundry Monitoring How-To: Collecting Metrics and Logs
Cloud Foundry Monitoring How-To: Collecting Metrics and Logs
 
Smart Baggage Tracking: End-to-End Sensor-Based Solution
Smart Baggage Tracking: End-to-End Sensor-Based SolutionSmart Baggage Tracking: End-to-End Sensor-Based Solution
Smart Baggage Tracking: End-to-End Sensor-Based Solution
 
Navigating the Ecosystem of Pivotal Cloud Foundry Tiles
Navigating the Ecosystem of Pivotal Cloud Foundry TilesNavigating the Ecosystem of Pivotal Cloud Foundry Tiles
Navigating the Ecosystem of Pivotal Cloud Foundry Tiles
 
AI as a Catalyst for IoT
AI as a Catalyst for IoTAI as a Catalyst for IoT
AI as a Catalyst for IoT
 
Over-Engineering: Causes, Symptoms, and Treatment
Over-Engineering: Causes, Symptoms, and TreatmentOver-Engineering: Causes, Symptoms, and Treatment
Over-Engineering: Causes, Symptoms, and Treatment
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Deep Learning with TensorFlow: Understanding Tensors, Computations Graphs, Images, and Text

  • 1. Deep Learning with TensorFlow Understanding Tensors, Computation Graphs, Images, Text Viswanath Puttagunta Technical Program Manager, Linaro
  • 2. Vish Puttagunta Technical Program Manager, Linaro Statistics/Signal Processing in Images, Audio, RF Data Analysis and Machine Learning on ARM SoCs. Leading collaboration in ARMTM Ecosystem Enterprise, Mobile, Home, Networking, IoT Built on Open Source
  • 3. Goals Basics behind Neural Networks Picturing Neural Networks. Understand the operations. Representing Neural Networks using Tensors and Computation Graphs Vision (MNIST), Text (Word2Vec) TensorFlow Gives you good tools to build a Neural Network Model. Some basic models… but Google's secret sauce still inside Google :)
  • 4. The Basics Linear Regression Weight / Bias Cost Function Gradient Descent to optimize a cost function Logistic Regression Neuron Activation
  • 5. Linear Regression Objective: Fit line/curve to minimize a cost function Line has "Weight / Slope" and "Bias / y-
  • 6. Cost Function, Gradient Descent Source: https://www.youtube.com/watch?v=SqA6TujbmWw&list=PLE6Wd9FR--Ecf_5nCbnSQMHqORpiChfJf&index=16 https://youtu.be/WnqQrPNYz5Q?list=PLaXDtXvwY-oDvedS3f4HW0b4KxqpJ_imw&t=284 ● Cost Function, J(𝞡) ○ Weight / Slope: 𝞡1 ○ Bias / y-intercept: 𝞡2 ● Gradient Descent ○ Go down to the lowest point in the cost function in small steps BIG IDEA ● Starts with some Weights & Biases ● Define a Cost Function ● Optimize the Cost function by doing some sort of Gradient Descent ● Lots of Help from TensorFlow.
  • 7. Weight, Bias in 0,1 Dimensions
  • 8. Neuron and Activation Function BIG IDEAS ● Only one of the Neurons will fire at a time (value shoots greater than 0.5) ● Which neuron depends on "x", Weights, Biases ● Rest of neurons will not fire. (value much less than 0.5) ● Outcomes are between 0 and 1 → Probabilities (all outputs add to one) ○ → Good for classification
  • 9. Neuron and Activation Function BIG IDEAS ● Only one of the Neurons will fire at a time (value shoots greater than 0.5) ● Which neuron depends on "x", Weights, Biases ● Rest of neurons will not fire. (value much less than 0.5) ● Outcomes are between 0 and 1 → Probabilities (all outputs add to one) ○ → Good for classification
  • 10. Neuron and Activation Function BIG IDEAS ● Only one of the Neurons will fire at a time (value shoots greater than 0.5) ● Which neuron depends on "x", Weights, Biases ● Rest of neurons will not fire. (value much less than 0.5) ● Outcomes are between 0 and 1 → Probabilities (all outputs add to one) ○ → Good for classification
  • 11. Same picture: Less mess, more classes
  • 12. Simple Neural Network for MNIST Source: https://www.tensorflow.org/versions/r0.7/tutorials/mnist/beginners/index.html
  • 13. Simple Neural Network for MNIST Weights actually Mean something!!
  • 14. Weights/Bias → Evidence → Probability BIG IDEAS ● After proper Gradient Descent, Weights Generalize well. ● Correlation operation corresponds to "Evidence" ● Then do softmax(evidence) and you will get Probability(x 𝞊 specific class) Source: https://www.tensorflow.org/versions/r0.7/tutorials/mnist/beginners/index.html
  • 15. MNIST Simple: Operations / Dimensions ● input image(x) ○ 28x28 matrix → 1x784 ○ each element type: 0 or 1 ● Weights (W0, W1…. W9) ○ 28x28 matrix → 1x784 ○ each element: float(-1, +1) ● Eg: W1Ⓧx (Correlation) ○ Multiply Accumulate! ■ matmul(W, xT) ○ single float (-1, +1) ● Biases (B0, B1…. B9) ○ single floating pt (-1, +1) ● Evidence: Eg: W1Ⓧx + B1 ○ single floating pt (- 784.0,+784.0) ● Probability ○ single float (0,1) ● Real output (Y), Predicted o/p(Y^) ○ 1x10 matrix ○ each is 0 or 1
  • 16. MNIST Simple: In TensorFlow
  • 17. MNIST Simple: In TensorFlow
  • 19. MNIST using Convolution Neural Network
  • 22. Weight, Bias in 0,1 Dimensions
  • 27. Text Analytics Word2Vec Thinking of words and as vectors Sequence-to-Sequence models Recurrent Neural Networks (LSTM) Understanding sequence of words "Don't like" is closer to "hate"
  • 28. Words as vectors (Embeddings) list → [human, cow] → int list [0, 1] → embeddings [(2,2), (4,0)]
  • 29. Sequence of words as vectors!
  • 34. word2vec: using Neural Network Note: Only trying to understand relationship between words and understand best way to vectorize words! Not really keen on sequence of words! (Later RNN)
  • 35. word2vec: using NN (softmax classifier) Realize wv could easily be w50000 words in vocabulary!
  • 36. word2vec: using NN (softmax classifier-pitfall) Too many computations for every set of inputs (Eg: Classifying across 50,000 classes if you vocabulary size is 50,000)
  • 37. word2vec: using Noise Classifier Big Idea: Instead of trying to move every word(vector) by little bit in each step Move few random words (~16) at a time If you have lots of sentences, you should be good
  • 39. word2vec Code Walk Through https://github.com/tensorflow/tensorflow/blob/master/tensorflow/exa mples/tutorials/word2vec/word2vec_basic.py
  • 40. Summary TensorFlow was simple to install (Ubuntu 14.04) sudo apt-get install python-pip python-dev sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow- 0.8.0rc0-cp27-none-linux_x86_64.whl Tutorials are 'relatively' easy to follow Good pointers to papers and blogs Would like to hear Google's perspective on
  • 41. References Convolution Neural Network: https://youtu.be/n6hpQwq7Inw TensorFlow Tutorials: https://www.tensorflow.org/versions/r0.7/tutorials/index.html Khan Academy (Linear algebra): https://www.khanacademy.org/ LSTM, Text Analytics: Alec Ratford, Indico https://www.youtube.com/watch?v=VINCQghQRuM Current trends in Deep Learning (Andrew Ng, Baidu) https://www.youtube.com/watch?v=O0VN0pGgBZM