-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
梯度全部为0(v2 api) #4381
Comments
感觉这里的
dotmul_operator
|
@guoshengCS 多谢,不过我试过了dotmul_operator, 梯度依然是全0。 |
换成CPU试试。 |
@lcy-seso 多谢,cpu就ok了,是sum_cost的backward在gpu上没有实现?最终还是希望能在gpu上正常训练,cpu太慢了。 |
a related issue #3714 |
sum_cost 可以在GPU下使用,问题可以参考 #3714 ,我建议可以调参稳定之后,切换到GPU下训练。 |
恩,好的,多谢,这个issue我close掉吧 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我使用了如下的训练过程:
cost是用的是 sum_cost, 简化如下:
其中
neg_log_probs
和labels
是两个dense_vector(1)
的sequence。但是训练得到的梯度全部是0,而参数的值看起来正常,cost的值也正常。看起来就像只执行了forward一样,请问这有可能是什么问题导致的错误?
The text was updated successfully, but these errors were encountered: