Skip to content

ch 08 练习 8.5.5 代码似乎有遗漏? #99

Open
@YueZhengMeng

Description

解答:
先对输入和标签进行设备(device)变换和形状(reshape)变换,再进行前向计算和反向传播,将隐状态的分离操作放在更新之前,避免了更新中对隐状态进行计算,这样无需对隐状态进行修改,即可实现了不会从计算图中分离隐状态。

但是给出的解答代码里并没有与分离梯度相关的detach_()函数

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions