Natural Language Processing · 免费预览
循环网络与门控记忆
作为无界上下文的循环隐藏状态、随时间反向传播、梯度消失问题、LSTM 门控,以及通往注意力机制的编码器-解码器桥梁。
1. Recurrent Networks and Gated Memory
Recurrent Networks and Gated Memory
2. Vanishing gradients and gates
Vanishing gradients and gates
3. Recurrence and gates in NumPy
Recurrence and gates in NumPy
4. Shapes of the shared matrices
A simple RNN has input dimension 6, hidden dimension 4, and a 3-word output softmax. What are the shapes of W, U, and V, and which of them are shared across time steps?
5. One recurrent step by hand
With , , and , compute the first component of , rounding to three decimals.
6. Geometric decay backward through time
Backpropagating through a simple RNN, the gradient shrinks by a factor of 0.95 at each of 20 time steps. Compute the fraction of the original gradient that survives, rounding to four decimals (a small scientific-notation value is also fine).
7. Four gates, four jobs
Match each LSTM gate to its role. Which pairing is right?
8. The constant error carousel
Why does the LSTM cell state carry gradients over long spans when the simple RNN hidden state cannot?