序列模型 道练习题
19 道题 · 0 已解决
序列模型用于处理顺序至关重要的数据,例如文本、语音和传感器读数。在 transformer 出现之前,循环网络(recurrent networks)一次读取序列的一个步骤,并向前传递一个 hidden state,有点像在阅读句子时在脑中保留一份实时摘要。这些概念对于语音、流式处理和更新的状态空间模型(state-space models)仍然非常重要。在这些题目中,你将运行一个 vanilla RNN,实现 LSTM 单元和 GRU 单元的一个步骤,提取每个序列的最后一个真实 hidden state,构建 teacher-forcing decoder 输入,计算 Bahdanau additive attention,在 linear RNN 中进行 backpropagate through time,使用 greedy 方式解码 CTC 输出,在 log 空间中使用 forward algorithm 计算 CTC loss,使用 Viterbi 解码最佳 HMM 路径,并使用 forward-backward 计算 HMM state posteriors。首先从 vanilla RNN、teacher forcing 和 CTC greedy decoding 的 Easy 题目开始。然后进行 LSTM, GRU, attention 和 Viterbi,最后完成 backprop through time, CTC loss 和 forward-backward。语音和基于时间的各种产品仍在广泛使用这些模型,面试官也会利用它们来测试你对 recurrence 和 dynamic programming 的掌握程度。
简单 5
中等 8
- Implement one step of an LSTM cellPro
- Run one step of a GRU cell on a batchPro
- Decode the best HMM path with ViterbiPro
- Compute Bahdanau additive attentionPro
- Run a stacked (multi-layer) RNN over a sequencePro
- Carry RNN state through padding with a maskPro
- Compute a Luong attention step with dot or general scoringPro
- Score a sequence with the HMM forward algorithmPro
困难 6
- Backpropagate through time in a linear RNNPro
- Compute the CTC loss with the forward algorithm in log spacePro
- Compute HMM state posteriors with forward-backwardPro
- Run a bidirectional RNN on padded sequences of different lengthsPro
- Unroll a seq2seq decoder with scheduled teacher forcingPro
- Implement the backward pass of one LSTM cell stepPro