๐Ÿ”„ Seq2Seq & Attention Mechanisms

127 words
1 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# ๐Ÿ”„ Seq2Seq & Attention Mechanisms ## 1. ๐ŸŽฏ Learning Objectives - Explain encoder-decoder for sequence tasks - Compute attention weights for alignment - Describe attention variants: additive, multiplicative, self-attention ## 2.

๐Ÿ”„ Seq2Seq & Attention Mechanisms

1. ๐ŸŽฏ Learning Objectives

  • Explain encoder-decoder for sequence tasks
  • Compute attention weights for alignment
  • Describe attention variants: additive, multiplicative, self-attention

2. ๐Ÿ“– Core Content

3.1 Encoder-Decoder

Encoder RNN: reads input sequence, produces context vector c. Decoder RNN: generates output sequence from c. Problem: Information bottleneck โ€” c must capture entire input sequence.

3.2 Attention Mechanism

Compute attention weights: ฮฑโ‚œแตข = softmax(score(hโ‚œ, sแตข)) Context vector: cโ‚œ = ฮฃแตข ฮฑโ‚œแตข hแตข Score functions:
  • Additive (Bahdanau): vแตƒ tanh(Wโ‚hโ‚œ + Wโ‚‚sแตข)
  • Dot product (Luong): hโ‚œแต€ sแตข
  • Scaled dot: hโ‚œแต€ sแตข / โˆšd

3.3 Benefits

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.