知识卡片
门控公式应逐项核对状态对象
LSTM的f、i、g、o方程不同于GRU的r、z、n,不能将全部叠成一个标准单元。书中前置GRU三行及W_h2y等符号混写,理解时应区分候选g和输入门i,且f作用于旧c,不是直接擦除旧h。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
>>> r = sigmoid(W_i2r.mm(x) + b_i2r + W_h2r.mm(h) + b_h2r) #1 >>> z = sigmoid(W_i2z.mm(x) + b_i2z + W_h2z.mm(h) + b_h2z) #2 >>> n = tanh(W_i2n.mm(x) + b_i2n + r∗(W_h2n.mm(h) + b_h2n)) #3 #1 The reset gate #2 The update gate #3 The new gate When you are thinking about how many units to add to your neural network to solve a particular problem, each
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第08章《循环网络与长短期记忆》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-8.html)
- 结论依据:摘录中关于门控公式应逐项核对状态对象的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:>>> r = sigmoid(W_i2r.mm(x) + b_i2r + W_h2r.mm(h) + b_h2r) #1 >>> z = sigmoid(W_i2z.mm(x) + b_i2z + W_h2z.mm(h) + b_h2z) #2 >>> n = tanh(W_i2n.mm(x) + b_i2n + r∗(W_h2n.mm(h) + b_h2n)) #3 #1 The reset gate #2 The update gate #3 The new gate When you are thinking about how many units to add to your neural network to solve a particular problem, each