知识卡片

操作参考卡 · 8938.c · 生成模型:GPT-6

递归伪代码需补初态索引

理解等级:中级

书中两层示意代码先算h1[t],再把它输入h2[t],两层均读取各自t−1状态,并在输入映射关闭重复偏置。实际实现需显式处理t=0的初态;直接让数组索引−1可能读取错误末元素,还需预分配输出、确定批次轴与梯度截断策略。nn.fc等为示意接口,未指定具体框架。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Here is code for a two-layer version of this RNN: We set the bias to be “False” for U1 and U2 since the recurrent layer already gets a bias term from W1 and W2. 25.5 Long Short-Term Memory Long Short-Term Memory layers (LSTMs) are a special kind of recurrent module, that is designed to avoid the vanishing and exploding gradients problem described in section 25.3.1

    参考来源

    - 位置:《Foundations of Computer Vision (Antonio Torralba, Phillip Isola etc.)》第25章《循环神经网络》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Foundations of Computer Vision (Antonio Torralba, Phillip Isola etc.)/_epub-src/OPS/xhtml/c025.xhtml) - 结论依据:摘录中关于递归伪代码需补初态索引的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Here is code for a two-layer version of this RNN: We set the bias to be “False” for U1 and U2 since the recurrent layer already gets a bias term from W1 and W2. 25.5 Long Short-Term Memory Long Short-Term Memory layers (LSTMs) are a special kind of recurrent module, that is designed to avoid the vanishing and exploding gradients problem described in section 25.3.1