Deep Learning U4
Deep Learning U4
• Definition: RNNs are designed to handle sequential data by maintaining a hidden state
that captures information from previous time steps. They are particularly effective for
tasks where the order of inputs is significant.
• Key Characteristics:
o Sequence Processing: Suitable for tasks like time series prediction, language
modeling, and sequence classification.
• Steps:
o Unroll the Network: Create copies of the network for each time step.
o Backward Pass: Backpropagate the loss through each time step to update the
weights.
• Vanishing Gradients: Gradients become too small, causing the network to stop
learning effectively.
o Solution: Use activation functions like ReLU, and architectures like LSTMs and
GRUs.
• Exploding Gradients: Gradients become too large, causing unstable updates and
divergent behavior.
4. Truncated BPTT
• Definition: A method to reduce the computational load of BPTT by truncating the
backpropagation to a fixed number of time steps.
• Steps:
• Definition: A type of RNN that uses gating mechanisms to control the flow of
information, addressing the vanishing gradient problem.
• Components:
• Definition: A type of RNN that uses a more complex gating mechanism to capture long-
term dependencies and solve the vanishing gradient problem.
• Components:
• Mechanism: LSTMs use cell states and gating mechanisms to maintain a constant flow
of gradients, preserving long-term dependencies and addressing the vanishing
gradient problem.
• Encoding: The process of converting input sequences into fixed-size context vectors
that capture essential information.
o Encoder: An RNN that processes the input sequence and produces a context
vector.
• Decoding: The process of generating output sequences from the context vectors.
o Decoder: An RNN that takes the context vector and generates the output
sequence.
9. Attention Mechanism
• Definition: A technique that allows the model to focus on specific parts of the input
sequence when making predictions, enhancing performance on tasks with long-range
dependencies.
• Types:
o Additive Attention: Combines the hidden states and context vectors additively.
• Application: Used in image captioning, where the model generates descriptions based
on focused image regions.
• Types:
• Image Captioning: Combining CNNs for feature extraction and RNNs for sequence
generation to produce textual descriptions of images.
• Image Generation: Using RNNs to generate new images based on learned patterns and
sequences.
• Text Generation: Generating coherent and contextually relevant text sequences based
on input data.
• Machine Translation: Translating text from one language to another using sequence-
to-sequence models with attention mechanisms.
• Sentiment Analysis: Analyzing the sentiment of text by capturing contextual
information and understanding the sentiment expressed.
• Video Captioning