We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bug描述 在按照教程2.3.3梯度章节中 “
out2 = x.sum() out2.backward() print(x.grad) ” 时我的返回结果是 tensor([[1., 1.], [1., 1.]]) 如图 请问是我的输入有问题么?
版本信息 pytorch: 1.9.0 torchvision: 0.10.0 torchtext: None ...
The text was updated successfully, but these errors were encountered:
你backward的是out2,对应的是x.sum(),梯度是1没问题; 原章节里的操作是对out = z.mean()进行backward之后查看x.grad
Sorry, something went wrong.
No branches or pull requests
bug描述
在按照教程2.3.3梯度章节中
“
再来反向传播一次,注意grad是累加的
out2 = x.sum()
out2.backward()
print(x.grad)
”
时我的返回结果是
tensor([[1., 1.],
[1., 1.]])
如图
请问是我的输入有问题么?
版本信息
pytorch: 1.9.0
torchvision: 0.10.0
torchtext: None
...
The text was updated successfully, but these errors were encountered: