
    {-j                     x    d dl Z ddlmZmZmZmZ  G d d          Z e e             e                      ZdS )    N   )SUPPORT_ACT_QUANTIZERSSUPPORT_WT_QUANTIZERSKLQuantizerPerChannelAbsmaxQuantizerc                   "     e Zd ZdZ fdZ xZS )	PTQConfigzF
    The PTQ config shows how to quantize the inputs and outputs.
    c                    t                                                       t          |t          t                              sJ t          |t          t
                              sJ t          j        |          | _        t          j        |          | _	        t          j        |          | _
        d| _        d| _        dS )a3  
        Constructor.

        Args:
            activation_quantizer(BaseQuantizer): The activation quantizer.
                It should be the instance of BaseQuantizer.
            weight_quantizer(BaseQuantizer): The weight quantizer.
                It should be the instance of BaseQuantizer.
        NF)super__init__
isinstancetupler   r   copydeepcopyin_act_quantizerout_act_quantizerwt_quantizerquant_hook_handleenable_in_act_quantizer)selfactivation_quantizerweight_quantizer	__class__s      i/var/www/html/banglarbhumi/venv/lib/python3.11/site-packages/paddle/quantization/imperative/ptq_config.pyr   zPTQConfig.__init__   s     	.6L0M0MNNNNN*E2G,H,HIIIII $.B C C!%/C!D!D M*:;;!% (-$$$    )__name__
__module____qualname____doc__r   __classcell__)r   s   @r   r	   r	      sB         - - - - - - - - -r   r	   )r   ptq_quantizerr   r   r   r   r	   default_ptq_config r   r   <module>r$      s               - - - - - - - -< Y{{}}.G.G.I.IJJ   r   