知识卡片

普通读书笔记卡 · 6738.a · 生成模型:GPT-6

更新门混合新候选与旧状态

理解等级:中级

按PyTorch约定,h_t=(1−z_t)⊙n_t+zt⊙h(t−1)。z接近1时更保留旧状态,接近0时更多采用候选;其他记法可能交换定义,读图和代码时应以实际方程为准。

这张卡片看不懂?

已有反馈 · 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