Deep Learning With Tensorflow
Deep Learning With Tensorflow
Deep Learning With Tensorflow
Women GDG
Techmakers Ahmedabad
Interest
Google NGRAM & Google Trends
I have worked all my life in Machine Learning, and I have never seen
one algorithm knock over benchmarks like Deep Learning
– Andrew Ng (Stanford & Baidu)
• Features
• Labels
• Examples
• Labelled example
• Unlabelled example
• Models (Train and Test)
• Classification model
• Regression model
What is Artificial
Intelligence?
Machine Learning -
Basics
Introduction
Machine Learning
Algorithm
Labeled Data
Training
Prediction
Provides
various
technique
Machine Learning -
Basics
Learning Approaches
Classification Regression
(supervised – predictive) (supervised – predictive)
● What is a tensor?
● A mathematical object, analogous to but more general than a vector,
represented by an array of components that are functions of the
coordinates of a space.
● TensorFlow computations are expressed as stateful dataflow graphs.
● The name TensorFlow derives from the operations that such neural
networks perform on multidimensional data arrays known as
‘tensors’.
Why TensorFlow?
• What is Scalability?
• Think of a Smart Traffic Management System of Ahmedabad city :D
• Roads having 4 lanes, number of cross-roads, and not for a single area
-> so much of Computation Data
• Streaming data, Continues data, Decision in real-time
• Single Computer cannot handle it
• Solution?
• Assign computers area/range wise then integrate all of them, this is no
more a complex task today
• Why?
• TensorFlow will take care of it!!
• It can scale the hardware/software requirements by clustering as per the
requirement
What TensorFlow does for You?
Gradient Descent finds the (local) minimum of the cost function (used to
calculate the output error) and is used to adjust the weights
Gradient Descent
• Convex problems have only one minimum; that is, only one place where the
slope is exactly 0. That minimum is where the loss function converges
• The gradient descent algorithm then calculates the gradient of the loss curve
at the starting point. In brief, a gradient is a vector of partial derivatives
• A gradient is a vector and hence has magnitude and direction
• The gradient always points in the direction of the minimum. The gradient
descent algorithm takes a step in the direction of the negative gradient in
order to reduce loss as quickly as possible
Gradient Descent
BACKPROPAGATION
Deep Learning
The Training Process
Forward it trough
the network to
Sample labeled data get predictions
Learns by generating an error signal that measures the difference between the
predictions of the network and the desired values and then using this error
signal to change the weights (or parameters) so that predictions get more
accurate.
Still not so Perfect!
Backprop can go wrong
• Vanishing Gradients:
• The gradients for the lower layers (closer to the input) can become very
small. In deep networks, computing these gradients can involve taking the
product of many small terms
• Exploding Gradients:
• If the weights in a network are very large, then the gradients for the lower
layers products of many large terms. In this case you can have exploding
gradients: gradients that get too large to converge
Ooooooverfitting = Game Over
• An overfit model gets a low loss during training but does a poor job predicting
new data
• Overfitting is caused by making a model more complex than necessary.
• The fundamental tension of machine learning is between fitting our data well,
but also fitting the data as simply as possible
Solution
Dropout Regularization
Now the problem with sigmoid function in multi-class classification is that the
values calculated on each of the output nodes may not necessarily sum up to
one.
The softmax function used for multi-classification model returns the probabilities
of each class.
Game Time!!
Visit kahoot.it
Game PIN: 508274
Convolutional Neural Nets (CNN)
Convolution layer is a feature detector that automagically learns to filter out not
needed information from an input by using convolution kernel.
Pooling layers compute the max or average value of a particular feature over a
region of the input data (downsizing of input images). Also helps to detect
objects in some unusual places and reduces memory size.
Convolution…! ;)
Convolution
Max Pooling
Let’s build our first CNN
Visit: https://
colab.research.google.com/drive/1arAJnnTn0wI3KoSSJHg_Hjw
40VPPMtP0
Takeaways
• DL Specialization: https://www.deeplearning.ai/
• Deep Learning A-Z™: Hands-On Artificial Neural Networks:
https://www.udemy.com/deeplearning/?
siteID=AKW.sgcfqI8oqN6eoMfxusNIligTml0Iw&LSNPUBID=AKW*sgcfqI8
• The Canonical Machine Learning Course:
https://www.coursera.org/learn/machine-learning
• CMU ML Course: http://www.cs.cmu.edu/~tom/10701_sp11/lectures.shtml
• University of Washington: https://www.coursera.org/learn/ml-foundations
This was just a Start!
Visit Blogs
• Over 200 of the Best Machine Learning, NLP, and Python Tutorials: https
://medium.com/machine-learning-in-practice/over-200-of-the-best-machine-le
arning-nlp-and-python-tutorials-2018-edition-dd8cf53cb7dc
• https://
towardsdatascience.com/why-deep-learning-is-needed-over-traditional-mac
hine-learning-1b6a99177063
• https://iamtrask.github.io/2015/07/12/basic-python-network/
• https://www.youtube.com/watch?v=BmkA1ZsG2P4
• https://
www.slideshare.net/LuMa921/deep-learning-a-visual-introduction?from_acti
on=save
• https://developers.google.com/machine-learning/crash-course/
Questions…??
Comments
Suggestions
Happy Learning!
Charmi Chokshi
AI and Data Enthusiast
Final year ICT Engineering
Student at Ahmedabad
University
Let’s Connect!
• LinkedIn
• Github
Women GDG
Techmakers Ahmedabad