diff --git a/SpatialConvolution.lua b/SpatialConvolution.lua index 23e92b9..8248c16 100644 --- a/SpatialConvolution.lua +++ b/SpatialConvolution.lua @@ -29,6 +29,7 @@ end function SpatialConvolution:resetWeightDescriptors(desc) assert(cudnn.typemap[torch.typename(self.weight)], 'Only Cuda supported duh!') assert(cudnn.typemap[torch.typename(self.bias)] or not self.bias, 'Only Cuda supported duh!') + self.groups = self.groups or 1 -- create descriptor for bias if self.bias then diff --git a/SpatialFullConvolution.lua b/SpatialFullConvolution.lua index 9093ce4..fe4703d 100644 --- a/SpatialFullConvolution.lua +++ b/SpatialFullConvolution.lua @@ -27,6 +27,7 @@ function SpatialFullConvolution:__init(nInputPlane, nOutputPlane, end function SpatialFullConvolution:resetWeightDescriptors() + self.groups = self.groups or 1 return Convolution.resetWeightDescriptors(self, {self.nInputPlane, self.nOutputPlane/self.groups, self.kH, self.kW})