U
    <ºc   ã                   @   sD   d dl Z d dlZd dlmZ G dd„ dejƒZG dd„ dejƒZdS )é    Nc                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )ÚLinearReluFunctionalChildc                    sN   t ƒ  ¡  t t ||¡¡| _t t |¡¡| _tjj	j
| jt d¡d d S ©Né   )Úa)ÚsuperÚ__init__ÚnnÚ	ParameterÚtorchÚemptyÚw1ÚzerosÚb1ÚinitÚkaiming_uniform_ÚmathÚsqrt©ÚselfÚN©Ú	__class__© ú]/tmp/pip-unpacked-wheel-gikjz4vx/torch/testing/_internal/quantization_torch_package_models.pyr      s    
z"LinearReluFunctionalChild.__init__c                 C   s(   t jj || j| j¡}t jj |¡}|S ©N)r
   r   Ú
functionalÚlinearr   r   Úrelu©r   Úxr   r   r   Úforward   s    z!LinearReluFunctionalChild.forward©Ú__name__Ú
__module__Ú__qualname__r   r    Ú__classcell__r   r   r   r   r      s   r   c                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )ÚLinearReluFunctionalc                    sX   t ƒ  ¡  t|ƒ| _t t ||¡¡| _t t 	|¡¡| _
tjjj| jt d¡d d S r   )r   r   r   Úchildr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r      s
    

zLinearReluFunctional.__init__c                 C   s2   |   |¡}tjj || j| j¡}tjj |¡}|S r   )r'   r
   r   r   r   r   r   r   r   r   r   r   r       s    
zLinearReluFunctional.forwardr!   r   r   r   r   r&      s   r&   )r   r
   Ztorch.nnr   ÚModuler   r&   r   r   r   r   Ú<module>   s   