Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system-a 中,梯度下降的循环中,梯度的 shape 与参数的 shape 不一致。 #2

Open
xieyuheng opened this issue Jun 3, 2024 · 1 comment

Comments

@xieyuheng
Copy link
Owner

xieyuheng commented Jun 3, 2024

训练鸢尾花的模型时,在循环中打印所求梯度,可以发现这一现象。

训练的结果不好,因为所得的梯度中有很多是 0。

需要单独测试梯度函数来看看是不是因为 target 函数没有返回标量导致的。

也可能是因为 extend2 用了 shape 而没有用 tlen,因此与书中不一致,导致的。

@xieyuheng
Copy link
Owner Author

原来是 "dying ReLU" problem,哈哈哈:

更多:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant