def _get_affine_act_post_process_mod_from_symmetric(self, module: _aoquant.FakeQuantizeBase):
        """
        Returns activation post process module which is same as module but with
        affine qscheme instead of symmetric.
        """
        activation_post_process = module.activation_post_process
        if type(activation_post_process) not in self._get_observer_type_to_param_names():
            raise ValueError(f"Found unrecognized observer type {type(activation_post_process)}.")
        observer_type = type(activation_post_process)
        observer_param_names = self._get_observer_type_to_param_names()[observer_type]
        kwargs = {k: getattr(activation_post_process, k) for k in observer_param_names}
        if "qscheme" in kwargs:
            kwargs["qscheme"] = _torch.per_tensor_affine

        if isinstance(module, _aoquant.FakeQuantize):
            if module.ch_axis != -1:
                new_act_post_process = _aoquant.FakeQuantize(
                    observer=observer_type, ch_axis=module.ch_axis, **kwargs
                )
            else:
                new_act_post_process = _aoquant.FakeQuantize(observer=observer_type, **kwargs)
        else:
            assert isinstance(module, _LearnableFakeQuantize)
            new_act_post_process = _LearnableFakeQuantize(observer=observer_type, **kwargs)
            if hasattr(module, "device"):
                new_act_post_process.set_device(self._device)
            if module.ch_axis != -1:
                new_act_post_process.set_ch_axis(module.ch_axis)
                new_act_post_process.set_param_shape(module.shape)

        return new_act_post_process

        Returns activation post process module which is same as module but with
        affine qscheme instead of symmetric.
        
coremltools/optimize/torch/quantization/_configure.py