The document discusses deep learning and neural networks. It begins by defining deep learning as a subfield of machine learning that is inspired by the structure and function of the brain. It then discusses how neural networks work, including how data is fed as input and passed through layers with weighted connections between neurons. The neurons perform operations like multiplying the weights and inputs, adding biases, and applying activation functions. The network is trained by comparing the predicted and actual outputs to calculate error and adjust the weights through backpropagation to reduce error. Deep learning platforms like TensorFlow, PyTorch, and Keras are also mentioned.
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Deep learning concepts and neural network basics
1.
2. What’s in it for you?
Cost function
How do neural networks work?
Deep learning platforms
Introduction to TensorFlow
Use case implementation using TensorFlow
Applications of deep learning
Why is deep learning important?
Activation function
What are neural networks?
What is deep learning?
9. Deep learning is a subfield of machine learning that deals with algorithms inspired
by the structure and function of the brain
10. Deep learning is a subfield of machine learning that deals with algorithms inspired
by the structure and function of the brain
Artificial Intelligence
Machine Learning
Deep Learning
11. Deep learning is a subfield of machine learning that deals with algorithms inspired
by the structure and function of the brain
Artificial Intelligence
Machine Learning
Deep Learning
Ability of a machine to imitate
intelligent human behavior
12. Deep learning is a subfield of machine learning that deals with algorithms inspired
by the structure and function of the brain
Artificial Intelligence
Machine Learning
Deep Learning
Ability of a machine to imitate
intelligent human behavior
Application of AI that allows a system
to automatically learn and improve
from experience
13. Deep learning is a subfield of machine learning that deals with algorithms inspired
by the structure and function of the brain
Artificial Intelligence
Machine Learning
Deep Learning
Ability of a machine to imitate
intelligent human behavior
Application of AI that allows a system
to automatically learn and improve
from experience
Application of machine learning that
uses complex algorithms and deep
neural nets to train a model
15. Works with unstructured data
Machine learning works only with large sets of
structured and semi-structured data, while
deep learning can work with both structured
and unstructured data
16.
17. Handles complex operations
Deep learning algorithms can perform
complex operations easily while machine
learning algorithms cannot
18.
19. Feature Extraction
Machine learning algorithms use labeled sample data to
extract patterns, while deep learning accepts large
volumes of data as input, analyze the input to extract
features out of an object
20.
21. Achieve best performance
Performance of machine learning algorithms decreases as
the amount of data increase, so to maintain the
performance of the model we need deep learning
35. Within each neuron the following operations are
performed:
• The product of each input and the weight of the
channel it’s passed over is found outputneuron
x
1
x2
x3
x4
inputs
36. Within each neuron the following operations are
performed:
• The product of each input and the weight of the
channel it’s passed over is found
• Sum of the weighted products is computed. This is
called the weighted sum
inputs
outputneuron
x
1
x2
x3
x4
x1*w1 + x2*w2 + x3*w3 + x4*w4
37. Within each neuron the following operations are
performed:
• The product of each input and the weight of the
channel it’s passed over is found
• Sum of the weighted products is computed. This is
called the weighted sum
• Bias unique to the neuron is added to the weighted
sum
inputs
outputneuron
x
1
x2
x3
x4
x1*w1 + x2*w2 + x3*w3 + x4*w4 + bias
38. Within each neuron the following operations are
performed:
• The product of each input and the weight of the
channel it’s passed over is found
• Sum of the weighted products is computed. This is
called the weighted sum
• Bias unique to the neuron is added to the weighted
sum
• The final sum is then subjected to a particular
function known as the activation function
inputs
output
x
1
x2
x3
x4
x1*w1 + x2*w2 + x3*w3 + x4*w4 + bias final sum
Activation function ( final sum)
41. inputs
predicted output
x
1
x2
x3
x4
neuron y^
The Cost value is the difference between the neural nets predicted
output and the actual output from a set of labeled training data
The least cost value is obtained by making adjustments to the weights
and biases iteratively throughout the training process
y
actual output
49. Data is passed on from layer to layer over weighted channels
Input layer Hidden layers
w1
w2
w3
wm
x1
x2
xn
50. Each neuron in the first hidden layer takes a subset of the inputs and processes it
Input layer Hidden layers
w1
w2
w3
wm
b1
b2
b3
b4
b5
x1
x2
xn
51. Each neuron in the first hidden layer takes a subset of the inputs and processes it
Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
Let’s look into what happens
within the neurons
52. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
Step 1: x1*w1 + x2*w2 + b1
Step 2: Φ(x1* w1 + x2*w2 + b1)
where Φ is an activation function
53. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
Step 1: x1*w1 + x2*w2 + b1
Step 2: Φ(x1* w1 + x2*w2 + b1)
where Φ is an activation function
The results of the activation function determine which neurons will be activated in the following
layer
54. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
The results of the activation function determine which neurons will be activated in the following
layer
w11
w1
2
w1n
b1
1
b12
b13
b14
b15
55. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
w11
w1
2
w1n
b1
1
b12
b13
b14
b15
The results of the activation function determine which neurons will be activated in the following
layer
56. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
Just as before, the information reaching this layer is processed after which a single neuron in the
output layer gets activated
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
w1n
w2k
57. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
Just as before, the information reaching this layer is processed after which a single neuron in the
output layer gets activated
w11
w1
2
w1m
b1
1
b12
b13
b14
b15
w2
1
w2m
square
circle
triangle
But, our input was a square!
What went wrong here?
58. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
Just as before, the information reaching this layer is processed after which a single neuron in the
output layer gets activated
w11
w1
2
w1m
b1
1
b12
b13
b14
b15
w2
1
w2m
square
circle
triangle
Well, our network needs to be
trained first
59. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
The predicted output is compared against the actual output by calculating the cost function
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
w1n
w2k
60. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
The most commonly used cost function is as
follows:
C=1/2(Y-Y)2^
where Y is the actual value and Y is the
predicted value
^
w1n
w2k
61. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
The cost function determines the error in prediction and reports it back to the neural network
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
w1n
w2k
62. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
wm
x1
x2
xn
This is called backpropagation
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
w1n
w2k
63. Input layer Hidden layers
w1
’
w2’
w3’
b1
b2
b3
b4
b5
wm’
x1
x2
xn
The weights are adjusted in order to reduce the error
w11
’
w12
’
w1n’
b1
1
b12
b13
b14
b15
w21’
w2k’
square
circle
triangle
^y
64. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
The network is trained with the new weights
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle^y
w1n’
w2k’
wm’
65. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
w1n’
w2k’
wm’
^y
C=1/2(Y-Y)2^
Once again, the cost is determined and back propagation is continued until the cost cannot be
reduced any further
67. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
w1n’
w2k’
wm’
Similarly, our network must be
trained to identify circles and
triangles too
68. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
^y
w1n’
w2k’
wm’
The weights are thus further
adjusted in order to predict the
three shapes with the highest
accuracy
69. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
w1n’
w2k’
wm’
We can now rely on our neural network to predict the input shapes
28
28
28*28=784
70. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
w1n’
w2k’
wm’
We can now rely on our neural network to predict the input shapes
28
28
28*28=784
71. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
w1n’
w2k’
wm’
We can now rely on our neural network to predict the input shapes
28
28
28*28=784
72. Input layer Hidden layers
w1
w2
w3
b1
b2
b3
b4
b5
x1
x2
xn
w11
w1
2
b1
1
b12
b13
b14
b15
w2
1 square
circle
triangle
w1n’
w2k’
wm’
We can now rely on our neural network to predict the input shapes
28
28
28*28=784
79. • Google’s TensorFlow is currently the most popular deep learning
library in the world
80. • Google’s TensorFlow is currently the most popular deep learning
library in the world
• Tensors are vectors or matrices of n dimensions.
a
m
k
q
d
Dimensions
2
4
8
1
1
9
3
2
5
4
4
6
6
3
3
7
8
2
9
5
[5] [5,4] [3,3,3]
81. • Google’s TensorFlow is currently the most popular deep learning
library in the world
• Tensors are vectors or matrices of n dimensions.
• In TensorFlow, all computations performed involve tensors
82. • Google’s TensorFlow is currently the most popular deep learning
library in the world
• Tensors are vectors or matrices of n dimensions.
• In TensorFlow, all computations performed involve tensors
• TensorFlow architecture is as follows
Pre-processing data Build a model Train and estimate the model