o
    ûpiå  ã                   @   s   d d„ Z dS )c                 C   s@   t | dƒs	J dƒ‚| j}|jr|j | |¡ |j | |f¡ dS )z(
    The forward_post_hook for PTQ.
    Ú_quant_configz(The layer should have _quant_config attrN)Úhasattrr   Zenable_in_act_quantizerZin_act_quantizerZsample_dataZout_act_quantizer)ÚlayerZinputsZoutputsZqc© r   úo/home/app/PaddleOCR-VL/.venv_paddleocr/lib/python3.10/site-packages/paddle/quantization/imperative/ptq_hooks.pyÚquant_forward_post_hook   s   ÿr   N)r   r   r   r   r   Ú<module>   s   