From 50e61979514affd1bc1c8a43bd20591e10dba402 Mon Sep 17 00:00:00 2001 From: geoffrey-g-delhomme <37144673+geoffrey-g-delhomme@users.noreply.github.com> Date: Fri, 12 May 2023 22:45:11 +0200 Subject: [PATCH] Update quant_conv.py --- .../pytorch_quantization/nn/modules/quant_conv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/pytorch-quantization/pytorch_quantization/nn/modules/quant_conv.py b/tools/pytorch-quantization/pytorch_quantization/nn/modules/quant_conv.py index 734c8313..95648851 100644 --- a/tools/pytorch-quantization/pytorch_quantization/nn/modules/quant_conv.py +++ b/tools/pytorch-quantization/pytorch_quantization/nn/modules/quant_conv.py @@ -299,7 +299,7 @@ def forward(self, input, output_size=None): if self.padding_mode != 'zeros': raise ValueError('Only `zeros` padding mode is supported for QuantConvTranspose1d') - output_padding = self._output_padding(input, output_size, self.stride, self.padding, self.kernel_size) + output_padding = self._output_padding(input, output_size, self.stride, self.padding, self.kernel_size, 1, self.dilation) quant_input, quant_weight = self._quant(input) output = F.conv_transpose1d(quant_input, quant_weight, self.bias, self.stride, self.padding, output_padding, @@ -339,7 +339,7 @@ def forward(self, input, output_size=None): if self.padding_mode != 'zeros': raise ValueError('Only `zeros` padding mode is supported for QuantConvTranspose2d') - output_padding = self._output_padding(input, output_size, self.stride, self.padding, self.kernel_size) + output_padding = self._output_padding(input, output_size, self.stride, self.padding, self.kernel_size, 2, self.dilation) quant_input, quant_weight = self._quant(input) output = F.conv_transpose2d(quant_input, quant_weight, self.bias, self.stride, self.padding, output_padding, @@ -380,7 +380,7 @@ def forward(self, input, output_size=None): if self.padding_mode != 'zeros': raise ValueError('Only `zeros` padding mode is supported for QuantConvTranspose3d') - output_padding = self._output_padding(input, output_size, self.stride, self.padding, self.kernel_size) + output_padding = self._output_padding(input, output_size, self.stride, self.padding, self.kernel_size, 3, self.dilation) quant_input, quant_weight = self._quant(input) output = F.conv_transpose3d(quant_input, quant_weight, self.bias, self.stride, self.padding, output_padding,