From f23feca681c5066c70f0fe1516fc2e269d615e93 Mon Sep 17 00:00:00 2001 From: Tongzhou Wang Date: Fri, 2 Feb 2018 12:39:33 -0500 Subject: Fix output_nr not incremented correctly (#4812) * fix output_nr not incremented correctly * update test_conv_double_backward to cover this case; call accGradParameters if any param (not just weight) requires grad in parse_nn.py * update Spatial/VolumetricFull(Dilated)Convolution to support accGradParameters with only bias requiring grad * Spatial/VolumetricConvolutionMM * Spatial/VolumetricDilatedConvolution * address @fmassa 's comments --- torch/legacy/nn/VolumetricFullConvolution.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'torch/legacy') diff --git a/torch/legacy/nn/VolumetricFullConvolution.py b/torch/legacy/nn/VolumetricFullConvolution.py index 18b7172d13..e0eb3faed2 100644 --- a/torch/legacy/nn/VolumetricFullConvolution.py +++ b/torch/legacy/nn/VolumetricFullConvolution.py @@ -102,6 +102,7 @@ class VolumetricFullConvolution(Module): self.bias, self.finput, self.fgradInput, + self.kT, self.kW, self.kH, self.dT, self.dW, self.dH, self.padT, self.padW, self.padH, adjT, adjW, adjH @@ -138,6 +139,7 @@ class VolumetricFullConvolution(Module): self.weight, self.finput, self.fgradInput, + self.kT, self.kW, self.kH, self.dT, self.dW, self.dH, self.padT, self.padW, self.padH, adjT, adjW, adjH @@ -179,6 +181,7 @@ class VolumetricFullConvolution(Module): self.gradBias, self.finput, self.fgradInput, + self.kT, self.kW, self.kH, self.dT, self.dW, self.dH, self.padT, self.padW, self.padH, adjT, adjW, adjH, -- cgit v1.2.3