SlideShare a Scribd company logo
1 of 28
Neural Networks
• Contents :-
• Why to study Neural Network
• What are Neural Network
• Brain Inspired Neural Network
• Simple Neuron Model
• Neural Network Model
• Neural Network for Boolean function
• Neural Network for Non Linear function
• Neural Network for Multiclass classification
MOHIT SHRIVASTAVA
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING
NIT WARANGAL
Why to study
Neural
Network
• Neural Network are used in problems where we need to learn complex non-linear
hypotheses.
• These non-linear hypotheses requires both higher degree and feature multiplicative
terms.
Why to study Neural Network
• The decision boundry for
the nonlinear classification
problem is complex and
can't be represented by
simple linear hypothesis.
• For such problem we fit a
logistic regression and it
will have both higher
degree and feature
multiplicative terms.
Why to study Neural Network
• If the input for such
classification is a image then
consider a small image of
100*100 pixel so 10000
features.
• If we fit a nonlinear
regression the number of
multiplicative feature terms
will increase to (n*(n+1))/2
• In this case it rises to 50
millions that is huge and not
efficient.
• Neural network helps us to
solve such problems
What are Neural Network
• Origins: Algorithms that try to mimic the brain.
• Very widely used in 80s and early 90s; popularity diminished in late 90s.
• Recent resurgence: State-of-the-art technique for many applica1ons
• Artificial neural networks are not nearly as complex or intricate as the actual brain
structure
What are
Neural
Network
Brain Inspired Neural
Network
• Brain function occurs as the result of the firing of
neurons
• Neurons connect to each other through synapses,
which propagate action potential (electrical impulses)
by releasing neurotransmitters
• Synapses can be excitatory (potential-increasing) or
inhibitory (potential-decreasing), and have varying
thresholds.
• Dinitrides receives the input.
• Axon gives the output.
Brain Inspired Neural
Network
• Synapses in neural network are weights between
layers.
• Thresholds of synapses in brain are activation
function in neural network.
• Axon and Dendrites are layer's input and output in
neural network.
Simple
Neuron
Model
Theta: Weights
X : Input with bias
Yellow circle: Activation of neuron
Each input is multiplied by weight
and summed up and then activation
function is applied here that is
Sigmoid function
Neural
Network
Model
A neural network with 3 layers
Neural
Network for
Boolean
function
A neuron represents the AND
Boolean function using sigmoid
activation function.
Neural
Network for
Boolean
function
Similar model like AND for OR
NOT using sigmoid activation
function.
Neural Network for
Non Linear function
• Combining Representations to
Create Non-Linear Functions like
XOR by adjusting weights.
• Here we are solving the problem of
more features that we had in
logistic regression by having more
layers into our network.
Neural Network for multiclass classification
• Till now we had hypothesis value as either
0 or 1 or it’s a binary classification
• Now we try to use neural network with
multiclass classification where there are
more than one classes
Neural Network for multiclass classification
• Number of input unit = number of
features
• Number of output unit = number of
classes
• Here for image classification number of
classes are 4 so 4 neuron in output layer
Neural Networks with backpropagation
algorithm
• Contents :-
• What is backporpagation algorithim
• Flow in backprop
What is backpropagation algorithm
• Backpropagation was derived by multiple researchers in the early 60's
• Paul Werbos was first in the US to propose that it could be used for
neural nets after analyzing it in depth in his 1974 PhD Thesis.
• In 1986, through the work of David E. Rumelhart, Geoffrey E.
Hinton, Ronald J. Williams, and James McClelland, backpropagation
gained recognition.
• Backpropagation is a training method used for a multi-layer neural
network.
• It is also called the generalized delta rule.
Flow in backpropagation algorithm
The training of a neural network by back propagation takes place in
three stages
1. Feedforward of the input pattern
2. Calculation and Back propagation of the associated error
3. Adjustments of the weights
Forward propagation
• Initially activation of
input layer is the
features only
• Z is the weighted sum of
activation and weights
• Note- bias are also
present.
Cost function
• It is generalization of
the logistic regression
cost function
• K is the no. Of neu in
output layer
• We just add up the cost
of each neuron in
output layer.
• At each iteration the
cost depresses.
• Note- regularization
term is also present.
Backpropagation:
Error Computation
• Each hidden node j is “responsible”
for some fraction of the error δ (l) in
each of the output nodes j to which
it connects
• δ (l) is divided according to the
strength of the j connection
between hidden node and the
output node
• Then, the “blame” is propagated
back to provide the error values for
the hidden layer
Training a Neural
Network via Gradient
Descent with Backprop
• Green box is the backprop
component.
• Computation of average regularized
gradient is optional.
• Note- We never initialize weights in
neural net as 0
Backpropagation for image classification
• We will now demonstrate how to use backpropagation for image classification
• We will use the Olivetti faces dataset.
• This dataset contains a set of face images taken between April 1992 and April 1994 at AT&T
Laboratories Cambridge.
• There are ten different images of each of 40 distinct subjects.
• For some subjects, the images were taken at different times, varying the lighting, facial expressions
(open / closed eyes, smiling / not smiling) and facial details (glasses / no glasses).
• All the images were taken against a dark homogeneous background with the subjects in an upright,
frontal position (with tolerance for some side movement).
Downloading the dataset and printing the
data.
Description
• Each image is a row in data along with its label.
Upper left corner shows the label and lower left shows the data item
number.
Multi-layer Perceptron classifier
• We will use classifier from sklearn scientific library
• Available under module sklearn.neural_network.MLPClassifier
• This model optimizes the cost function using LBFGS or stochastic gradient descent
Code:-

More Related Content

What's hot

Introduction Of Artificial neural network
Introduction Of Artificial neural networkIntroduction Of Artificial neural network
Introduction Of Artificial neural networkNagarajan
 
Classification by back propagation, multi layered feed forward neural network...
Classification by back propagation, multi layered feed forward neural network...Classification by back propagation, multi layered feed forward neural network...
Classification by back propagation, multi layered feed forward neural network...bihira aggrey
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningMohamed Loey
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)EdutechLearners
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural NetworkPrakash K
 
Introduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkKnoldus Inc.
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural networkmustafa aadel
 
Feedforward neural network
Feedforward neural networkFeedforward neural network
Feedforward neural networkSopheaktra YONG
 
Neural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseNeural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseMohaiminur Rahman
 
CNN and its applications by ketaki
CNN and its applications by ketakiCNN and its applications by ketaki
CNN and its applications by ketakiKetaki Patwari
 
Recursive Neural Networks
Recursive Neural NetworksRecursive Neural Networks
Recursive Neural NetworksSangwoo Mo
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural NetworksDatabricks
 
Graph neural networks overview
Graph neural networks overviewGraph neural networks overview
Graph neural networks overviewRodion Kiryukhin
 
Artificial neural networks
Artificial neural networksArtificial neural networks
Artificial neural networksmadhu sudhakar
 
nural network ER. Abhishek k. upadhyay
nural network ER. Abhishek  k. upadhyaynural network ER. Abhishek  k. upadhyay
nural network ER. Abhishek k. upadhyayabhishek upadhyay
 
Neural networks and deep learning
Neural networks and deep learningNeural networks and deep learning
Neural networks and deep learningJörgen Sandig
 

What's hot (20)

Introduction Of Artificial neural network
Introduction Of Artificial neural networkIntroduction Of Artificial neural network
Introduction Of Artificial neural network
 
Classification by back propagation, multi layered feed forward neural network...
Classification by back propagation, multi layered feed forward neural network...Classification by back propagation, multi layered feed forward neural network...
Classification by back propagation, multi layered feed forward neural network...
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep Learning
 
Perceptron & Neural Networks
Perceptron & Neural NetworksPerceptron & Neural Networks
Perceptron & Neural Networks
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 
Introduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural Network
 
Adaptive Resonance Theory (ART)
Adaptive Resonance Theory (ART)Adaptive Resonance Theory (ART)
Adaptive Resonance Theory (ART)
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 
Dbscan algorithom
Dbscan algorithomDbscan algorithom
Dbscan algorithom
 
Feedforward neural network
Feedforward neural networkFeedforward neural network
Feedforward neural network
 
Neural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseNeural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics Course
 
CNN and its applications by ketaki
CNN and its applications by ketakiCNN and its applications by ketaki
CNN and its applications by ketaki
 
Recursive Neural Networks
Recursive Neural NetworksRecursive Neural Networks
Recursive Neural Networks
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural Networks
 
Graph neural networks overview
Graph neural networks overviewGraph neural networks overview
Graph neural networks overview
 
Artificial neural networks
Artificial neural networksArtificial neural networks
Artificial neural networks
 
nural network ER. Abhishek k. upadhyay
nural network ER. Abhishek  k. upadhyaynural network ER. Abhishek  k. upadhyay
nural network ER. Abhishek k. upadhyay
 
Neural networks and deep learning
Neural networks and deep learningNeural networks and deep learning
Neural networks and deep learning
 

Similar to Neural net and back propagation

Introduction to Neural networks (under graduate course) Lecture 9 of 9
Introduction to Neural networks (under graduate course) Lecture 9 of 9Introduction to Neural networks (under graduate course) Lecture 9 of 9
Introduction to Neural networks (under graduate course) Lecture 9 of 9Randa Elanwar
 
neuralnetwork.pptx
neuralnetwork.pptxneuralnetwork.pptx
neuralnetwork.pptxSherinRappai
 
Artificial Neural Networks for NIU session 2016 17
Artificial Neural Networks for NIU session 2016 17 Artificial Neural Networks for NIU session 2016 17
Artificial Neural Networks for NIU session 2016 17 Prof. Neeta Awasthy
 
33.-Multi-Layer-Perceptron.pdf
33.-Multi-Layer-Perceptron.pdf33.-Multi-Layer-Perceptron.pdf
33.-Multi-Layer-Perceptron.pdfgnans Kgnanshek
 
Machine learning by using python lesson 2 Neural Networks By Professor Lili S...
Machine learning by using python lesson 2 Neural Networks By Professor Lili S...Machine learning by using python lesson 2 Neural Networks By Professor Lili S...
Machine learning by using python lesson 2 Neural Networks By Professor Lili S...Professor Lili Saghafi
 
Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)Jon Lederman
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural networknainabhatt2
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural NetworkNainaBhatt1
 
Artificial Neural Network Learning Algorithm.ppt
Artificial Neural Network Learning Algorithm.pptArtificial Neural Network Learning Algorithm.ppt
Artificial Neural Network Learning Algorithm.pptNJUSTAiMo
 
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Simplilearn
 
Artificial neural network by arpit_sharma
Artificial neural network by arpit_sharmaArtificial neural network by arpit_sharma
Artificial neural network by arpit_sharmaEr. Arpit Sharma
 
Basics of Artificial Neural Network
Basics of Artificial Neural Network Basics of Artificial Neural Network
Basics of Artificial Neural Network Subham Preetam
 
artificial-neural-networks-rev.ppt
artificial-neural-networks-rev.pptartificial-neural-networks-rev.ppt
artificial-neural-networks-rev.pptRINUSATHYAN
 
artificial-neural-networks-rev.ppt
artificial-neural-networks-rev.pptartificial-neural-networks-rev.ppt
artificial-neural-networks-rev.pptSanaMateen7
 

Similar to Neural net and back propagation (20)

Introduction to Neural networks (under graduate course) Lecture 9 of 9
Introduction to Neural networks (under graduate course) Lecture 9 of 9Introduction to Neural networks (under graduate course) Lecture 9 of 9
Introduction to Neural networks (under graduate course) Lecture 9 of 9
 
neuralnetwork.pptx
neuralnetwork.pptxneuralnetwork.pptx
neuralnetwork.pptx
 
neuralnetwork.pptx
neuralnetwork.pptxneuralnetwork.pptx
neuralnetwork.pptx
 
Deep learning
Deep learningDeep learning
Deep learning
 
Artificial Neural Networks for NIU session 2016 17
Artificial Neural Networks for NIU session 2016 17 Artificial Neural Networks for NIU session 2016 17
Artificial Neural Networks for NIU session 2016 17
 
Unit 2 ml.pptx
Unit 2 ml.pptxUnit 2 ml.pptx
Unit 2 ml.pptx
 
33.-Multi-Layer-Perceptron.pdf
33.-Multi-Layer-Perceptron.pdf33.-Multi-Layer-Perceptron.pdf
33.-Multi-Layer-Perceptron.pdf
 
Machine learning by using python lesson 2 Neural Networks By Professor Lili S...
Machine learning by using python lesson 2 Neural Networks By Professor Lili S...Machine learning by using python lesson 2 Neural Networks By Professor Lili S...
Machine learning by using python lesson 2 Neural Networks By Professor Lili S...
 
UNIT 5-ANN.ppt
UNIT 5-ANN.pptUNIT 5-ANN.ppt
UNIT 5-ANN.ppt
 
Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 
Artificial Neural Network Learning Algorithm.ppt
Artificial Neural Network Learning Algorithm.pptArtificial Neural Network Learning Algorithm.ppt
Artificial Neural Network Learning Algorithm.ppt
 
Neural network
Neural networkNeural network
Neural network
 
Neural network
Neural networkNeural network
Neural network
 
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
 
Artificial neural network by arpit_sharma
Artificial neural network by arpit_sharmaArtificial neural network by arpit_sharma
Artificial neural network by arpit_sharma
 
Basics of Artificial Neural Network
Basics of Artificial Neural Network Basics of Artificial Neural Network
Basics of Artificial Neural Network
 
artificial-neural-networks-rev.ppt
artificial-neural-networks-rev.pptartificial-neural-networks-rev.ppt
artificial-neural-networks-rev.ppt
 
artificial-neural-networks-rev.ppt
artificial-neural-networks-rev.pptartificial-neural-networks-rev.ppt
artificial-neural-networks-rev.ppt
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
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 MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

Neural net and back propagation

  • 1. Neural Networks • Contents :- • Why to study Neural Network • What are Neural Network • Brain Inspired Neural Network • Simple Neuron Model • Neural Network Model • Neural Network for Boolean function • Neural Network for Non Linear function • Neural Network for Multiclass classification MOHIT SHRIVASTAVA DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING NIT WARANGAL
  • 2. Why to study Neural Network • Neural Network are used in problems where we need to learn complex non-linear hypotheses. • These non-linear hypotheses requires both higher degree and feature multiplicative terms.
  • 3. Why to study Neural Network • The decision boundry for the nonlinear classification problem is complex and can't be represented by simple linear hypothesis. • For such problem we fit a logistic regression and it will have both higher degree and feature multiplicative terms.
  • 4. Why to study Neural Network • If the input for such classification is a image then consider a small image of 100*100 pixel so 10000 features. • If we fit a nonlinear regression the number of multiplicative feature terms will increase to (n*(n+1))/2 • In this case it rises to 50 millions that is huge and not efficient. • Neural network helps us to solve such problems
  • 5. What are Neural Network • Origins: Algorithms that try to mimic the brain. • Very widely used in 80s and early 90s; popularity diminished in late 90s. • Recent resurgence: State-of-the-art technique for many applica1ons • Artificial neural networks are not nearly as complex or intricate as the actual brain structure
  • 7. Brain Inspired Neural Network • Brain function occurs as the result of the firing of neurons • Neurons connect to each other through synapses, which propagate action potential (electrical impulses) by releasing neurotransmitters • Synapses can be excitatory (potential-increasing) or inhibitory (potential-decreasing), and have varying thresholds. • Dinitrides receives the input. • Axon gives the output.
  • 8. Brain Inspired Neural Network • Synapses in neural network are weights between layers. • Thresholds of synapses in brain are activation function in neural network. • Axon and Dendrites are layer's input and output in neural network.
  • 9. Simple Neuron Model Theta: Weights X : Input with bias Yellow circle: Activation of neuron Each input is multiplied by weight and summed up and then activation function is applied here that is Sigmoid function
  • 11.
  • 12. Neural Network for Boolean function A neuron represents the AND Boolean function using sigmoid activation function.
  • 13. Neural Network for Boolean function Similar model like AND for OR NOT using sigmoid activation function.
  • 14. Neural Network for Non Linear function • Combining Representations to Create Non-Linear Functions like XOR by adjusting weights. • Here we are solving the problem of more features that we had in logistic regression by having more layers into our network.
  • 15. Neural Network for multiclass classification • Till now we had hypothesis value as either 0 or 1 or it’s a binary classification • Now we try to use neural network with multiclass classification where there are more than one classes
  • 16. Neural Network for multiclass classification • Number of input unit = number of features • Number of output unit = number of classes • Here for image classification number of classes are 4 so 4 neuron in output layer
  • 17. Neural Networks with backpropagation algorithm • Contents :- • What is backporpagation algorithim • Flow in backprop
  • 18. What is backpropagation algorithm • Backpropagation was derived by multiple researchers in the early 60's • Paul Werbos was first in the US to propose that it could be used for neural nets after analyzing it in depth in his 1974 PhD Thesis. • In 1986, through the work of David E. Rumelhart, Geoffrey E. Hinton, Ronald J. Williams, and James McClelland, backpropagation gained recognition. • Backpropagation is a training method used for a multi-layer neural network. • It is also called the generalized delta rule.
  • 19. Flow in backpropagation algorithm The training of a neural network by back propagation takes place in three stages 1. Feedforward of the input pattern 2. Calculation and Back propagation of the associated error 3. Adjustments of the weights
  • 20. Forward propagation • Initially activation of input layer is the features only • Z is the weighted sum of activation and weights • Note- bias are also present.
  • 21. Cost function • It is generalization of the logistic regression cost function • K is the no. Of neu in output layer • We just add up the cost of each neuron in output layer. • At each iteration the cost depresses. • Note- regularization term is also present.
  • 22. Backpropagation: Error Computation • Each hidden node j is “responsible” for some fraction of the error δ (l) in each of the output nodes j to which it connects • δ (l) is divided according to the strength of the j connection between hidden node and the output node • Then, the “blame” is propagated back to provide the error values for the hidden layer
  • 23. Training a Neural Network via Gradient Descent with Backprop • Green box is the backprop component. • Computation of average regularized gradient is optional. • Note- We never initialize weights in neural net as 0
  • 24. Backpropagation for image classification • We will now demonstrate how to use backpropagation for image classification • We will use the Olivetti faces dataset. • This dataset contains a set of face images taken between April 1992 and April 1994 at AT&T Laboratories Cambridge. • There are ten different images of each of 40 distinct subjects. • For some subjects, the images were taken at different times, varying the lighting, facial expressions (open / closed eyes, smiling / not smiling) and facial details (glasses / no glasses). • All the images were taken against a dark homogeneous background with the subjects in an upright, frontal position (with tolerance for some side movement).
  • 25. Downloading the dataset and printing the data.
  • 26. Description • Each image is a row in data along with its label. Upper left corner shows the label and lower left shows the data item number.
  • 27. Multi-layer Perceptron classifier • We will use classifier from sklearn scientific library • Available under module sklearn.neural_network.MLPClassifier • This model optimizes the cost function using LBFGS or stochastic gradient descent