We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6a00fa commit b9e00dfCopy full SHA for b9e00df
torch/nn/_functions/linear.py
@@ -82,6 +82,6 @@ def backward(self, grad_output):
82
grad_weight = torch.mm(buff.t(), input2)
83
84
if bias is not None and self.needs_input_grad[3]:
85
- grad_bias = grad_output.sum(0)
+ grad_bias = grad_output.sum(0, True)
86
87
return grad_input1, grad_input2, grad_weight, grad_bias
0 commit comments