tinynn/graph/quantization/qat_modules.py [178:207]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            in_channels,
            out_channels,
            kernel_size,
            stride,
            padding,
            output_padding,
            groups,
            bias,
            dilation,
            padding_mode,
            **factory_kwargs,
        )
        assert qconfig, 'qconfig must be provided for QAT module'
        self.qconfig = qconfig
        if LooseVersion(torch.__version__) < LooseVersion('1.7.0'):
            self.activation_post_process = qconfig.activation()
        if LooseVersion(torch.__version__) >= LooseVersion('1.9.0'):
            self.weight_fake_quant = qconfig.weight(factory_kwargs=factory_kwargs)
        else:
            self.weight_fake_quant = qconfig.weight()

    def forward(self, input, output_size=None):
        if self.padding_mode != 'zeros':
            raise ValueError('Only `zeros` padding mode is supported for ConvTranspose1d')

        assert isinstance(self.padding, tuple)

        output_padding = self._output_padding(
            input, output_size, self.stride, self.padding, self.kernel_size, self.dilation
        )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tinynn/graph/quantization/qat_modules.py [289:318]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            in_channels,
            out_channels,
            kernel_size,
            stride,
            padding,
            output_padding,
            groups,
            bias,
            dilation,
            padding_mode,
            **factory_kwargs,
        )
        assert qconfig, 'qconfig must be provided for QAT module'
        self.qconfig = qconfig
        if LooseVersion(torch.__version__) < LooseVersion('1.7.0'):
            self.activation_post_process = qconfig.activation()
        if LooseVersion(torch.__version__) >= LooseVersion('1.9.0'):
            self.weight_fake_quant = qconfig.weight(factory_kwargs=factory_kwargs)
        else:
            self.weight_fake_quant = qconfig.weight()

    def forward(self, input, output_size=None):
        if self.padding_mode != 'zeros':
            raise ValueError('Only `zeros` padding mode is supported for ConvTranspose1d')

        assert isinstance(self.padding, tuple)

        output_padding = self._output_padding(
            input, output_size, self.stride, self.padding, self.kernel_size, self.dilation
        )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



