def calculate_qparams(self):
        """
        Method that computes, processes and returns the learned quantization parameters.
        """

        # Need to do this here because backward pass can update scale after a training step
        self.scale.data.clamp_(min=self.eps.item())

        # Need to do this here because backward pass can update zero_point after a training step
        if _is_symmetric_quant(self.qscheme) and self.signed:
            self.zero_point.data.zero_()
        elif _is_symmetric_quant(self.qscheme):
            assert not self.signed
            if not self.has_customized_qrange:
                self.zero_point.data.fill_(128.0)
            else:
                self.zero_point.data.fill_(float((self.quant_min + self.quant_max) // 2))
        else:
            self.zero_point.data.round_().clamp_(self.quant_min, self.quant_max)
            self.zero_point.data = self.zero_point.float().data

        scale = self.scale.detach()
        zero_point = self.zero_point.detach()

        zero_point = zero_point.int()

        # scale and zero-point are required to be 1-dimensional for export
        if self.ch_axis != -1:
            scale = _torch.squeeze(scale)
            zero_point = _torch.squeeze(zero_point)

        return scale, zero_point

        Method that computes, processes and returns the learned quantization parameters.
        
coremltools/optimize/torch/quantization/modules/learnable_fake_quantize.py