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 9a497f8 commit 98581b9Copy full SHA for 98581b9
torch/csrc/autograd/functions/convolution.cpp
@@ -307,10 +307,12 @@ auto ConvBackward::apply(const variable_list& grad_outputs) -> variable_list {
307
}
308
309
if (k == 3) {
310
- if (should_compute_output(0)) {
311
- grad_input = view3d(*grad_input);
+ if (grad_input) {
+ grad_input = view3d(*grad_input);
312
+ }
313
+ if (grad_weight) {
314
+ grad_weight = view3d(*grad_weight);
315
- grad_weight = view3d(*grad_weight);
316
317
318
auto outputs = as_tensor_list(std::move(grad_input),
0 commit comments