Artificial Intelligence: Long Short Term Memory Networks
Artificial Intelligence: Long Short Term Memory Networks
𝑦𝑡 = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 𝑊ℎ𝑦 ℎ𝑡 + 𝑏𝑦
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 2
Recurrent Neural Network
L
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 3
Long Short Term Memory
✓ RNN limitations:
❖ Vanishing gradient
❖ Exploding gradient
❖ Suffering from long-term dependency
LSTM
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 4
Long Short Term Memory
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 5
Long Short Term Memory
✓ Cell state
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 6
Long Short Term Memory
✓ Gate
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 7
Long Short Term Memory
✓ Forget gate
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 8
Long Short Term Memory
✓ Input gate
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 9
Long Short Term Memory
✓ Cell state update
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 10
Long Short Term Memory
✓ Output gate
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 11
Long Short Term Memory
𝑦𝑡 = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 𝑊ℎ𝑦 ℎ𝑡 + 𝑏𝑦
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 12
Long Short Term Memory
✓ Example: Language model - Character level
❖ Training sequence: “hello”
❖ Vocabulary: h, e, l, o
Pham Viet Cuong - Dept. Control Eng. & Automation, FEEE, HCMUT 13
Long Short Term Memory
✓ Example: Language model - Character level
❖ Training sequence: “hello”
❖ Vocabulary: h, e, l, o