SlideShare a Scribd company logo
Recurrent Neural Networks (RNNs)
Recurrent Neural Network (RNN)
• An artificial neural network adapted to work for time series data or data that involves
sequences.
• Uses a Hidden Layer that remembers specific information about a sequence
• RNN has a Memory that stores all information about the calculations.
• Formed from Feed-forward Networks
Recurrent Neural Network (RNN)
• Uses the same weights for each element of the sequence
• Need to inform about the previous inputs before evaluating the result
• Comparing that result to the expected value will give us an error
• Propagating the error back through the same path will adjust the variables.
Why Recurrent Neural Networks?
RNN were created because there were a few issues in the feed-forward neural network
 Cannot handle sequential data
 Considers only the current input
 Cannot memorize previous inputs
 Loss of neighborhood information.
 Does not have any loops or circles.
Architecture of RNN
Types of Recurrent Neural Networks
Steps for training a RNN
• Initial input is sent with same weight and activation function.
• Current state calculated by using current input & previous state output
• Current state Xt becomes Xt-1 for second time step.
• Keeps on repeating for all the steps
• Final step calculated by current state of final state and all other previous steps.
• An error is generated by calculating the difference between the actual output and generated output
by RNN model.
• Final step is when the process of back propagation occurs
xi1
O1
t=1
W_hh
xi2
O2
t=2
xi3
O3
t=2
O0
W_xh
W_hh W_hh W_hh
W_xh W_xh W_xh W_xh
f
Y^i
xi4
O4
t=4
f
Ot
xt
Yi
O1=f(Xi1w_hh + O0W_xh) O3= f(Xi3W_hh + O2W_xh)
O2=f(Xi2w_hh + O1W_xh) O4= f(Xi4W_hh + O3W_xh)
Recurrance formula
ht = fw( ht-1, xt )
ht= new hidden state
fw= some functions of parameter w
ht-1= old state
xt= input vector at some time spent
Example: Character-level Language Model
Vocabulary: [h,e,l,o]
Example training sequence: “hello”
Continued…
Vocabulary: [h,e,l,o]
At test-time sample characters
one at a time,
feed back to model
Back Propagatipon
To reduce lose function derivative of y^i
∂L/∂y^i
By Chain rule W_xh is dependent on y^i, ∂L/∂y^i
∂L/∂w_xh= (∂L/∂y^i * ∂y^i/∂w_xh)
Weight Updation,
W_hh_new= W_xh – ∂L/∂w_xh
Weight Updation W_xh w.r.t O3 in Backward
Propagation at time t3
By Chain Rule O4 is dependent on W_hh, y^i
dependent on O4, loss is dependent on y^I, ∂L/∂y^
∂L/∂w_xh= (∂L/∂y^i * ∂y^i/∂O4 * ∂O4/∂w_hh)
W_new_hh=W_xh – (∂L/∂y^i * ∂y^i/∂O4 *
∂O4/∂w_hh)
Loss=y - y^i
xi1
O1
t=1
W_hh
xi2
O2
t=2
xi2
O3
t=2
f
Y^i
xi4
O4
t=4
O0
W_xh W_xh W_xh W_xh W_xh
W_hh W_hh W_hh
Application
Machine Translation Text Classification
Captioning Images Recognition of Speech
Advantage
 Computation is slow.
 Training can be difficult.
 Using of relu or tanh as activation functions can bevery
difficult to process sequences that are very long.
 Prone to problems such as exploding and gradient
vanishing.
 Input of any length.
 To remember each information throughout the time which is
very helpful in any time series predictor.
 Even if the input size is larger, the model size does not
increase.
 Weights shared across the time steps.
Disadvantage
Vanishing & Exploding
Gradient
How to identify a vanishing or
exploding gradients problem?
Vanishing
❑ Weights of earlier layers can become 0.
❑ Training stops after a few iterations.
Exploding
❑ Weights become unexpectedly large.
❑ Gradient value for error persists over 1.0.
LSTM
Working Process of LSTM
Forget Gate
 Xt: Input to the current timestamp
 Uf: Weight associated with the input
 Ht-1: The Hidden state of the previous timestamp
 Wf: It is the weight matrix associated with the hidden
state
Continued
“Bob knows swimming. He told me over the phone
that he had served the navy for four long years.”
Bob single-handedly fought the enemy and died for
his country. For his contributions, brave______.”
Continued…
Gradient Clipping
Clipping – by – value
A minimum clip value and a maximum clip value.
 g ← ∂C/∂W
• ‖g‖ ≥ max_threshold or ‖g‖ ≤ min_threshold
• g ← threshold (accordingly)
Clipping – by – norm
Clip the gradients by multiplying the unit vector of the
gradients with the threshold.
 g ← ∂C/∂W
 if ‖g‖ ≥ threshold then
 g ← threshold * g/‖g‖
Thank You
Ad

More Related Content

What's hot (20)

Multilayer perceptron
Multilayer perceptronMultilayer perceptron
Multilayer perceptron
omaraldabash
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networks
Akash Goel
 
Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.
StephenTec
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Simplilearn
 
LSTM Basics
LSTM BasicsLSTM Basics
LSTM Basics
Akshay Sehgal
 
Logistic regression in Machine Learning
Logistic regression in Machine LearningLogistic regression in Machine Learning
Logistic regression in Machine Learning
Kuppusamy P
 
Activation function
Activation functionActivation function
Activation function
RakshithGowdakodihal
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
Shuai Zhang
 
Cnn
CnnCnn
Cnn
Nirthika Rajendran
 
Machine Learning With Logistic Regression
Machine Learning  With Logistic RegressionMachine Learning  With Logistic Regression
Machine Learning With Logistic Regression
Knoldus Inc.
 
Back propagation
Back propagationBack propagation
Back propagation
Nagarajan
 
Deep learning
Deep learningDeep learning
Deep learning
Mohamed Loey
 
Recurrent Neural Networks. Part 1: Theory
Recurrent Neural Networks. Part 1: TheoryRecurrent Neural Networks. Part 1: Theory
Recurrent Neural Networks. Part 1: Theory
Andrii Gakhov
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep Learning
Mohamed Loey
 
Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10)
Larry Guo
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
Transfer Learning and Fine-tuning Deep Neural Networks
 Transfer Learning and Fine-tuning Deep Neural Networks Transfer Learning and Fine-tuning Deep Neural Networks
Transfer Learning and Fine-tuning Deep Neural Networks
PyData
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
EdutechLearners
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
Ashray Bhandare
 
An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms
Hakky St
 
Multilayer perceptron
Multilayer perceptronMultilayer perceptron
Multilayer perceptron
omaraldabash
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networks
Akash Goel
 
Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.
StephenTec
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Simplilearn
 
Logistic regression in Machine Learning
Logistic regression in Machine LearningLogistic regression in Machine Learning
Logistic regression in Machine Learning
Kuppusamy P
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
Shuai Zhang
 
Machine Learning With Logistic Regression
Machine Learning  With Logistic RegressionMachine Learning  With Logistic Regression
Machine Learning With Logistic Regression
Knoldus Inc.
 
Back propagation
Back propagationBack propagation
Back propagation
Nagarajan
 
Recurrent Neural Networks. Part 1: Theory
Recurrent Neural Networks. Part 1: TheoryRecurrent Neural Networks. Part 1: Theory
Recurrent Neural Networks. Part 1: Theory
Andrii Gakhov
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep Learning
Mohamed Loey
 
Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10)
Larry Guo
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
Transfer Learning and Fine-tuning Deep Neural Networks
 Transfer Learning and Fine-tuning Deep Neural Networks Transfer Learning and Fine-tuning Deep Neural Networks
Transfer Learning and Fine-tuning Deep Neural Networks
PyData
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
EdutechLearners
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
Ashray Bhandare
 
An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms
Hakky St
 

Similar to Recurrent Neural Networks (RNNs) (20)

Complete solution for Recurrent neural network.pptx
Complete solution for Recurrent neural network.pptxComplete solution for Recurrent neural network.pptx
Complete solution for Recurrent neural network.pptx
ArunKumar674066
 
14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt
ManiMaran230751
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
Junaid Bhat
 
RNN and LSTM model description and working advantages and disadvantages
RNN and LSTM model description and working advantages and disadvantagesRNN and LSTM model description and working advantages and disadvantages
RNN and LSTM model description and working advantages and disadvantages
AbhijitVenkatesh1
 
Sequencing and Attention Models - 2nd Version
Sequencing and Attention Models - 2nd VersionSequencing and Attention Models - 2nd Version
Sequencing and Attention Models - 2nd Version
ssuserbd372d
 
Advanced Machine Learning
Advanced Machine LearningAdvanced Machine Learning
Advanced Machine Learning
ANANDBABUGOPATHOTI1
 
lec10new.ppt
lec10new.pptlec10new.ppt
lec10new.ppt
SumantKuch
 
rnn BASICS
rnn BASICSrnn BASICS
rnn BASICS
Priyanka Reddy
 
Lec10new
Lec10newLec10new
Lec10new
Ananda Gopathoti
 
lec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
lec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwlec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
lec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
khushbu maurya
 
Artificial neutral network cousre of AI.ppt
Artificial neutral network cousre of AI.pptArtificial neutral network cousre of AI.ppt
Artificial neutral network cousre of AI.ppt
attaurahman
 
recurrent_neural_networks_april_2020.pptx
recurrent_neural_networks_april_2020.pptxrecurrent_neural_networks_april_2020.pptx
recurrent_neural_networks_april_2020.pptx
SagarTekwani4
 
Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...
Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...
Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...
Universitat Politècnica de Catalunya
 
Recurrent Neural Networks
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
Sharath TS
 
Deep learning (2)
Deep learning (2)Deep learning (2)
Deep learning (2)
Muhanad Al-khalisy
 
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLAn In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
VijaySharma802
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Edureka!
 
10.0 SequenceModeling-merged-compressed_edited.pptx
10.0 SequenceModeling-merged-compressed_edited.pptx10.0 SequenceModeling-merged-compressed_edited.pptx
10.0 SequenceModeling-merged-compressed_edited.pptx
ykchia03
 
Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020
Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020
Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020
Universitat Politècnica de Catalunya
 
Recurrent Neural Networks
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
CloudxLab
 
Complete solution for Recurrent neural network.pptx
Complete solution for Recurrent neural network.pptxComplete solution for Recurrent neural network.pptx
Complete solution for Recurrent neural network.pptx
ArunKumar674066
 
14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt
ManiMaran230751
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
Junaid Bhat
 
RNN and LSTM model description and working advantages and disadvantages
RNN and LSTM model description and working advantages and disadvantagesRNN and LSTM model description and working advantages and disadvantages
RNN and LSTM model description and working advantages and disadvantages
AbhijitVenkatesh1
 
Sequencing and Attention Models - 2nd Version
Sequencing and Attention Models - 2nd VersionSequencing and Attention Models - 2nd Version
Sequencing and Attention Models - 2nd Version
ssuserbd372d
 
lec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
lec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwlec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
lec10newwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
khushbu maurya
 
Artificial neutral network cousre of AI.ppt
Artificial neutral network cousre of AI.pptArtificial neutral network cousre of AI.ppt
Artificial neutral network cousre of AI.ppt
attaurahman
 
recurrent_neural_networks_april_2020.pptx
recurrent_neural_networks_april_2020.pptxrecurrent_neural_networks_april_2020.pptx
recurrent_neural_networks_april_2020.pptx
SagarTekwani4
 
Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...
Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...
Recurrent Neural Networks (DLAI D7L1 2017 UPC Deep Learning for Artificial In...
Universitat Politècnica de Catalunya
 
Recurrent Neural Networks
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
Sharath TS
 
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLAn In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
VijaySharma802
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Edureka!
 
10.0 SequenceModeling-merged-compressed_edited.pptx
10.0 SequenceModeling-merged-compressed_edited.pptx10.0 SequenceModeling-merged-compressed_edited.pptx
10.0 SequenceModeling-merged-compressed_edited.pptx
ykchia03
 
Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020
Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020
Recurrent Neural Networks RNN - Xavier Giro - UPC TelecomBCN Barcelona 2020
Universitat Politècnica de Catalunya
 
Recurrent Neural Networks
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
CloudxLab
 
Ad

More from Abdullah al Mamun (20)

Underfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine LearningUnderfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine Learning
Abdullah al Mamun
 
Random Forest
Random ForestRandom Forest
Random Forest
Abdullah al Mamun
 
Principal Component Analysis PCA
Principal Component Analysis PCAPrincipal Component Analysis PCA
Principal Component Analysis PCA
Abdullah al Mamun
 
Natural Language Processing (NLP)
Natural Language Processing (NLP)Natural Language Processing (NLP)
Natural Language Processing (NLP)
Abdullah al Mamun
 
Naive Bayes
Naive BayesNaive Bayes
Naive Bayes
Abdullah al Mamun
 
Multilayer Perceptron Neural Network MLP
Multilayer Perceptron Neural Network MLPMultilayer Perceptron Neural Network MLP
Multilayer Perceptron Neural Network MLP
Abdullah al Mamun
 
Linear Regression
Linear RegressionLinear Regression
Linear Regression
Abdullah al Mamun
 
K-Nearest Neighbor(KNN)
K-Nearest Neighbor(KNN)K-Nearest Neighbor(KNN)
K-Nearest Neighbor(KNN)
Abdullah al Mamun
 
Hidden Markov Model (HMM)
Hidden Markov Model (HMM)Hidden Markov Model (HMM)
Hidden Markov Model (HMM)
Abdullah al Mamun
 
Ensemble Method (Bagging Boosting)
Ensemble Method (Bagging Boosting)Ensemble Method (Bagging Boosting)
Ensemble Method (Bagging Boosting)
Abdullah al Mamun
 
Convolutional Neural Networks CNN
Convolutional Neural Networks CNNConvolutional Neural Networks CNN
Convolutional Neural Networks CNN
Abdullah al Mamun
 
Artificial Neural Network ANN
Artificial Neural Network ANNArtificial Neural Network ANN
Artificial Neural Network ANN
Abdullah al Mamun
 
Reinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-LearningReinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-Learning
Abdullah al Mamun
 
Session on evaluation of DevSecOps
Session on evaluation of DevSecOpsSession on evaluation of DevSecOps
Session on evaluation of DevSecOps
Abdullah al Mamun
 
Artificial Intelligence: Classification, Applications, Opportunities, and Cha...
Artificial Intelligence: Classification, Applications, Opportunities, and Cha...Artificial Intelligence: Classification, Applications, Opportunities, and Cha...
Artificial Intelligence: Classification, Applications, Opportunities, and Cha...
Abdullah al Mamun
 
DevOps Presentation.pptx
DevOps Presentation.pptxDevOps Presentation.pptx
DevOps Presentation.pptx
Abdullah al Mamun
 
Python Virtual Environment.pptx
Python Virtual Environment.pptxPython Virtual Environment.pptx
Python Virtual Environment.pptx
Abdullah al Mamun
 
Artificial intelligence Presentation.pptx
Artificial intelligence Presentation.pptxArtificial intelligence Presentation.pptx
Artificial intelligence Presentation.pptx
Abdullah al Mamun
 
An approach to empirical Optical Character recognition paradigm using Multi-L...
An approach to empirical Optical Character recognition paradigm using Multi-L...An approach to empirical Optical Character recognition paradigm using Multi-L...
An approach to empirical Optical Character recognition paradigm using Multi-L...
Abdullah al Mamun
 
Automatic Speaker Recognition system using MFCC and VQ approach
Automatic Speaker Recognition system using MFCC and VQ approachAutomatic Speaker Recognition system using MFCC and VQ approach
Automatic Speaker Recognition system using MFCC and VQ approach
Abdullah al Mamun
 
Underfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine LearningUnderfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine Learning
Abdullah al Mamun
 
Principal Component Analysis PCA
Principal Component Analysis PCAPrincipal Component Analysis PCA
Principal Component Analysis PCA
Abdullah al Mamun
 
Natural Language Processing (NLP)
Natural Language Processing (NLP)Natural Language Processing (NLP)
Natural Language Processing (NLP)
Abdullah al Mamun
 
Multilayer Perceptron Neural Network MLP
Multilayer Perceptron Neural Network MLPMultilayer Perceptron Neural Network MLP
Multilayer Perceptron Neural Network MLP
Abdullah al Mamun
 
Ensemble Method (Bagging Boosting)
Ensemble Method (Bagging Boosting)Ensemble Method (Bagging Boosting)
Ensemble Method (Bagging Boosting)
Abdullah al Mamun
 
Convolutional Neural Networks CNN
Convolutional Neural Networks CNNConvolutional Neural Networks CNN
Convolutional Neural Networks CNN
Abdullah al Mamun
 
Artificial Neural Network ANN
Artificial Neural Network ANNArtificial Neural Network ANN
Artificial Neural Network ANN
Abdullah al Mamun
 
Reinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-LearningReinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-Learning
Abdullah al Mamun
 
Session on evaluation of DevSecOps
Session on evaluation of DevSecOpsSession on evaluation of DevSecOps
Session on evaluation of DevSecOps
Abdullah al Mamun
 
Artificial Intelligence: Classification, Applications, Opportunities, and Cha...
Artificial Intelligence: Classification, Applications, Opportunities, and Cha...Artificial Intelligence: Classification, Applications, Opportunities, and Cha...
Artificial Intelligence: Classification, Applications, Opportunities, and Cha...
Abdullah al Mamun
 
Python Virtual Environment.pptx
Python Virtual Environment.pptxPython Virtual Environment.pptx
Python Virtual Environment.pptx
Abdullah al Mamun
 
Artificial intelligence Presentation.pptx
Artificial intelligence Presentation.pptxArtificial intelligence Presentation.pptx
Artificial intelligence Presentation.pptx
Abdullah al Mamun
 
An approach to empirical Optical Character recognition paradigm using Multi-L...
An approach to empirical Optical Character recognition paradigm using Multi-L...An approach to empirical Optical Character recognition paradigm using Multi-L...
An approach to empirical Optical Character recognition paradigm using Multi-L...
Abdullah al Mamun
 
Automatic Speaker Recognition system using MFCC and VQ approach
Automatic Speaker Recognition system using MFCC and VQ approachAutomatic Speaker Recognition system using MFCC and VQ approach
Automatic Speaker Recognition system using MFCC and VQ approach
Abdullah al Mamun
 
Ad

Recently uploaded (20)

Publication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdf
Publication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdfPublication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdf
Publication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdf
StatsCommunications
 
Digital Disruption Use Case_Music Industry_for students.pdf
Digital Disruption Use Case_Music Industry_for students.pdfDigital Disruption Use Case_Music Industry_for students.pdf
Digital Disruption Use Case_Music Industry_for students.pdf
ProsenjitMitra9
 
Dr. Robert Krug - Expert In Artificial Intelligence
Dr. Robert Krug - Expert In Artificial IntelligenceDr. Robert Krug - Expert In Artificial Intelligence
Dr. Robert Krug - Expert In Artificial Intelligence
Dr. Robert Krug
 
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm     mmmmmfftro.pptxlecture_13 tree in mmmmmmmm     mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
sarajafffri058
 
Feature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record SystemsFeature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record Systems
Process mining Evangelist
 
CS-404 COA COURSE FILE JAN JUN 2025.docx
CS-404 COA COURSE FILE JAN JUN 2025.docxCS-404 COA COURSE FILE JAN JUN 2025.docx
CS-404 COA COURSE FILE JAN JUN 2025.docx
nidarizvitit
 
From Data to Insight: How News Aggregator APIs Deliver Contextual Intelligence
From Data to Insight: How News Aggregator APIs Deliver Contextual IntelligenceFrom Data to Insight: How News Aggregator APIs Deliver Contextual Intelligence
From Data to Insight: How News Aggregator APIs Deliver Contextual Intelligence
Contify
 
End to End Process Analysis - Cox Communications
End to End Process Analysis - Cox CommunicationsEnd to End Process Analysis - Cox Communications
End to End Process Analysis - Cox Communications
Process mining Evangelist
 
Introduction to systems thinking tools_Eng.pdf
Introduction to systems thinking tools_Eng.pdfIntroduction to systems thinking tools_Eng.pdf
Introduction to systems thinking tools_Eng.pdf
AbdurahmanAbd
 
Introduction to Python_for_machine_learning.pdf
Introduction to Python_for_machine_learning.pdfIntroduction to Python_for_machine_learning.pdf
Introduction to Python_for_machine_learning.pdf
goldenflower34
 
Time series analysis & forecasting day 2.pptx
Time series analysis & forecasting day 2.pptxTime series analysis & forecasting day 2.pptx
Time series analysis & forecasting day 2.pptx
AsmaaMahmoud89
 
2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf
2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf
2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf
AngelitaVergara1
 
Ann Naser Nabil- Data Scientist Portfolio.pdf
Ann Naser Nabil- Data Scientist Portfolio.pdfAnn Naser Nabil- Data Scientist Portfolio.pdf
Ann Naser Nabil- Data Scientist Portfolio.pdf
আন্ নাসের নাবিল
 
Mixed Methods Research.pptx education 201
Mixed Methods Research.pptx education 201Mixed Methods Research.pptx education 201
Mixed Methods Research.pptx education 201
GraceSolaa1
 
390713553-Introduction-to-Apportionment-and-Voting.pptx
390713553-Introduction-to-Apportionment-and-Voting.pptx390713553-Introduction-to-Apportionment-and-Voting.pptx
390713553-Introduction-to-Apportionment-and-Voting.pptx
KhimJDAbordo
 
Red Hat Openshift Training - openshift (1).pptx
Red Hat Openshift Training - openshift (1).pptxRed Hat Openshift Training - openshift (1).pptx
Red Hat Openshift Training - openshift (1).pptx
ssuserf60686
 
Concrete_Presenbmlkvvbvvvfvbbbfcfftation.pptx
Concrete_Presenbmlkvvbvvvfvbbbfcfftation.pptxConcrete_Presenbmlkvvbvvvfvbbbfcfftation.pptx
Concrete_Presenbmlkvvbvvvfvbbbfcfftation.pptx
ssuserd1f4a3
 
Urban models for professional practice 03
Urban models for professional practice 03Urban models for professional practice 03
Urban models for professional practice 03
DanisseLoiDapdap
 
Bringing data to life - Crime webinar Accessible.pptx
Bringing data to life - Crime webinar Accessible.pptxBringing data to life - Crime webinar Accessible.pptx
Bringing data to life - Crime webinar Accessible.pptx
Office for National Statistics
 
The-Future-is-Now-Information-Technology-Trends.pptx.pdf
The-Future-is-Now-Information-Technology-Trends.pptx.pdfThe-Future-is-Now-Information-Technology-Trends.pptx.pdf
The-Future-is-Now-Information-Technology-Trends.pptx.pdf
winnt04
 
Publication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdf
Publication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdfPublication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdf
Publication-launch-How-is-Life-for-Children-in-the-Digital-Age-15-May-2025.pdf
StatsCommunications
 
Digital Disruption Use Case_Music Industry_for students.pdf
Digital Disruption Use Case_Music Industry_for students.pdfDigital Disruption Use Case_Music Industry_for students.pdf
Digital Disruption Use Case_Music Industry_for students.pdf
ProsenjitMitra9
 
Dr. Robert Krug - Expert In Artificial Intelligence
Dr. Robert Krug - Expert In Artificial IntelligenceDr. Robert Krug - Expert In Artificial Intelligence
Dr. Robert Krug - Expert In Artificial Intelligence
Dr. Robert Krug
 
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm     mmmmmfftro.pptxlecture_13 tree in mmmmmmmm     mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
sarajafffri058
 
Feature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record SystemsFeature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record Systems
Process mining Evangelist
 
CS-404 COA COURSE FILE JAN JUN 2025.docx
CS-404 COA COURSE FILE JAN JUN 2025.docxCS-404 COA COURSE FILE JAN JUN 2025.docx
CS-404 COA COURSE FILE JAN JUN 2025.docx
nidarizvitit
 
From Data to Insight: How News Aggregator APIs Deliver Contextual Intelligence
From Data to Insight: How News Aggregator APIs Deliver Contextual IntelligenceFrom Data to Insight: How News Aggregator APIs Deliver Contextual Intelligence
From Data to Insight: How News Aggregator APIs Deliver Contextual Intelligence
Contify
 
End to End Process Analysis - Cox Communications
End to End Process Analysis - Cox CommunicationsEnd to End Process Analysis - Cox Communications
End to End Process Analysis - Cox Communications
Process mining Evangelist
 
Introduction to systems thinking tools_Eng.pdf
Introduction to systems thinking tools_Eng.pdfIntroduction to systems thinking tools_Eng.pdf
Introduction to systems thinking tools_Eng.pdf
AbdurahmanAbd
 
Introduction to Python_for_machine_learning.pdf
Introduction to Python_for_machine_learning.pdfIntroduction to Python_for_machine_learning.pdf
Introduction to Python_for_machine_learning.pdf
goldenflower34
 
Time series analysis & forecasting day 2.pptx
Time series analysis & forecasting day 2.pptxTime series analysis & forecasting day 2.pptx
Time series analysis & forecasting day 2.pptx
AsmaaMahmoud89
 
2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf
2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf
2-Cholera-Outbreaks-and-Waterborne-Pathogens-Typhoid-fever (1).pdf
AngelitaVergara1
 
Mixed Methods Research.pptx education 201
Mixed Methods Research.pptx education 201Mixed Methods Research.pptx education 201
Mixed Methods Research.pptx education 201
GraceSolaa1
 
390713553-Introduction-to-Apportionment-and-Voting.pptx
390713553-Introduction-to-Apportionment-and-Voting.pptx390713553-Introduction-to-Apportionment-and-Voting.pptx
390713553-Introduction-to-Apportionment-and-Voting.pptx
KhimJDAbordo
 
Red Hat Openshift Training - openshift (1).pptx
Red Hat Openshift Training - openshift (1).pptxRed Hat Openshift Training - openshift (1).pptx
Red Hat Openshift Training - openshift (1).pptx
ssuserf60686
 
Concrete_Presenbmlkvvbvvvfvbbbfcfftation.pptx
Concrete_Presenbmlkvvbvvvfvbbbfcfftation.pptxConcrete_Presenbmlkvvbvvvfvbbbfcfftation.pptx
Concrete_Presenbmlkvvbvvvfvbbbfcfftation.pptx
ssuserd1f4a3
 
Urban models for professional practice 03
Urban models for professional practice 03Urban models for professional practice 03
Urban models for professional practice 03
DanisseLoiDapdap
 
The-Future-is-Now-Information-Technology-Trends.pptx.pdf
The-Future-is-Now-Information-Technology-Trends.pptx.pdfThe-Future-is-Now-Information-Technology-Trends.pptx.pdf
The-Future-is-Now-Information-Technology-Trends.pptx.pdf
winnt04
 

Recurrent Neural Networks (RNNs)

  • 2. Recurrent Neural Network (RNN) • An artificial neural network adapted to work for time series data or data that involves sequences. • Uses a Hidden Layer that remembers specific information about a sequence • RNN has a Memory that stores all information about the calculations. • Formed from Feed-forward Networks
  • 3. Recurrent Neural Network (RNN) • Uses the same weights for each element of the sequence • Need to inform about the previous inputs before evaluating the result • Comparing that result to the expected value will give us an error • Propagating the error back through the same path will adjust the variables.
  • 4. Why Recurrent Neural Networks? RNN were created because there were a few issues in the feed-forward neural network  Cannot handle sequential data  Considers only the current input  Cannot memorize previous inputs  Loss of neighborhood information.  Does not have any loops or circles.
  • 6. Types of Recurrent Neural Networks
  • 7. Steps for training a RNN • Initial input is sent with same weight and activation function. • Current state calculated by using current input & previous state output • Current state Xt becomes Xt-1 for second time step. • Keeps on repeating for all the steps • Final step calculated by current state of final state and all other previous steps. • An error is generated by calculating the difference between the actual output and generated output by RNN model. • Final step is when the process of back propagation occurs xi1 O1 t=1 W_hh xi2 O2 t=2 xi3 O3 t=2 O0 W_xh W_hh W_hh W_hh W_xh W_xh W_xh W_xh f Y^i xi4 O4 t=4 f Ot xt Yi O1=f(Xi1w_hh + O0W_xh) O3= f(Xi3W_hh + O2W_xh) O2=f(Xi2w_hh + O1W_xh) O4= f(Xi4W_hh + O3W_xh) Recurrance formula ht = fw( ht-1, xt ) ht= new hidden state fw= some functions of parameter w ht-1= old state xt= input vector at some time spent
  • 8. Example: Character-level Language Model Vocabulary: [h,e,l,o] Example training sequence: “hello”
  • 9. Continued… Vocabulary: [h,e,l,o] At test-time sample characters one at a time, feed back to model
  • 10. Back Propagatipon To reduce lose function derivative of y^i ∂L/∂y^i By Chain rule W_xh is dependent on y^i, ∂L/∂y^i ∂L/∂w_xh= (∂L/∂y^i * ∂y^i/∂w_xh) Weight Updation, W_hh_new= W_xh – ∂L/∂w_xh Weight Updation W_xh w.r.t O3 in Backward Propagation at time t3 By Chain Rule O4 is dependent on W_hh, y^i dependent on O4, loss is dependent on y^I, ∂L/∂y^ ∂L/∂w_xh= (∂L/∂y^i * ∂y^i/∂O4 * ∂O4/∂w_hh) W_new_hh=W_xh – (∂L/∂y^i * ∂y^i/∂O4 * ∂O4/∂w_hh) Loss=y - y^i xi1 O1 t=1 W_hh xi2 O2 t=2 xi2 O3 t=2 f Y^i xi4 O4 t=4 O0 W_xh W_xh W_xh W_xh W_xh W_hh W_hh W_hh
  • 11. Application Machine Translation Text Classification Captioning Images Recognition of Speech
  • 12. Advantage  Computation is slow.  Training can be difficult.  Using of relu or tanh as activation functions can bevery difficult to process sequences that are very long.  Prone to problems such as exploding and gradient vanishing.  Input of any length.  To remember each information throughout the time which is very helpful in any time series predictor.  Even if the input size is larger, the model size does not increase.  Weights shared across the time steps. Disadvantage
  • 14. How to identify a vanishing or exploding gradients problem? Vanishing ❑ Weights of earlier layers can become 0. ❑ Training stops after a few iterations. Exploding ❑ Weights become unexpectedly large. ❑ Gradient value for error persists over 1.0.
  • 15. LSTM
  • 16. Working Process of LSTM Forget Gate  Xt: Input to the current timestamp  Uf: Weight associated with the input  Ht-1: The Hidden state of the previous timestamp  Wf: It is the weight matrix associated with the hidden state
  • 17. Continued “Bob knows swimming. He told me over the phone that he had served the navy for four long years.” Bob single-handedly fought the enemy and died for his country. For his contributions, brave______.”
  • 19. Gradient Clipping Clipping – by – value A minimum clip value and a maximum clip value.  g ← ∂C/∂W • ‖g‖ ≥ max_threshold or ‖g‖ ≤ min_threshold • g ← threshold (accordingly) Clipping – by – norm Clip the gradients by multiplying the unit vector of the gradients with the threshold.  g ← ∂C/∂W  if ‖g‖ ≥ threshold then  g ← threshold * g/‖g‖
  翻译: