ó
    EñiG.  ã                   óü  • S SK r S SKJrJrJrJrJrJrJrJ	r	  S SK
Jr  / SQr " S S\ R                  R                  5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r g))é    N)ÚBatchNorm1dÚBatchNorm2dÚBatchNorm3dÚConv1dÚConv2dÚConv3dÚLinearÚReLU)Útype_before_parametrizations)Ú
ConvReLU1dÚ
ConvReLU2dÚ
ConvReLU3dÚ
LinearReLUÚConvBn1dÚConvBn2dÚConvBnReLU1dÚConvBnReLU2dÚConvBn3dÚConvBnReLU3dÚBNReLU2dÚBNReLU3dÚ
LinearBn1dÚLinearLeakyReLUÚ
LinearTanhÚ	ConvAdd2dÚConvAddReLU2dc                   ó   • \ rS rSrSrg)Ú_FusedModuleé&   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r    ó    Ú`/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/ao/nn/intrinsic/modules/fused.pyr   r   &   s   † Úr&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é*   z–This is a sequential container which calls the Conv1d and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g ©Nú#Incorrect types for input modules: z and )r   r   r
   ÚAssertionErrorr!   ÚsuperÚ__init__©ÚselfÚconvÚreluÚ	__class__s      €r'   r/   ÚConvReLU1d.__init__.   óf   ø€ ä(¨Ó.´&Ó8Ü,¨TÓ2´dÓ:ä Ø5Ü/°Ó5×>Ñ>Ð?¸uÜ/°Ó5×>Ñ>Ð?ðAóð ô
 	‰Ñ˜Õ$r&   r    ©r!   r"   r#   r$   Ú__doc__r/   r%   Ú__classcell__©r4   s   @r'   r   r   *   ó   ø† ñV÷
%ó 
%r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é;   z–This is a sequential container which calls the Conv2d and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r
   r-   r!   r.   r/   r0   s      €r'   r/   ÚConvReLU2d.__init__?   r6   r&   r    r7   r:   s   @r'   r   r   ;   r;   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   éL   z–This is a sequential container which calls the Conv3d and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r
   r-   r!   r.   r/   r0   s      €r'   r/   ÚConvReLU3d.__init__P   r6   r&   r    r7   r:   s   @r'   r   r   L   r;   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é]   z–This is a sequential container which calls the Linear and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r	   r
   r-   r!   r.   r/   )r1   Úlinearr3   r4   s      €r'   r/   ÚLinearReLU.__init__a   sf   ø€ ä(¨Ó0´FÓ:Ü,¨TÓ2´dÓ:ä Ø5Ü/°Ó7×@Ñ@ÐAÀÜ/°Ó5×>Ñ>Ð?ðAóð ô
 	‰Ñ˜Õ&r&   r    r7   r:   s   @r'   r   r   ]   s   ø† ñV÷
'ó 
'r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   én   z This is a sequential container which calls the Conv 1d and Batch Norm 1d modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r   r-   r!   r.   r/   ©r1   r2   Úbnr4   s      €r'   r/   ÚConvBn1d.__init__r   óe   ø€ ä(¨Ó.´&Ó8Ü,¨RÓ0´KÓ?ä Ø5Ü/°Ó5×>Ñ>Ð?¸uÜ/°Ó3×<Ñ<Ð=ð?óð ô
 	‰Ñ˜Õ"r&   r    r7   r:   s   @r'   r   r   n   ó   ø† ñV÷
#ó 
#r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é   z This is a sequential container which calls the Conv 2d and Batch Norm 2d modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r   r-   r!   r.   r/   rL   s      €r'   r/   ÚConvBn2d.__init__ƒ   rO   r&   r    r7   r:   s   @r'   r   r      rP   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é�   z§This is a sequential container which calls the Conv 1d, Batch Norm 1d, and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c           
      ó2  >• [        U5      [        :X  a&  [        U5      [        :X  a  [        U5      [        :X  dM  [	        S[        U5      R
                   S[        U5      R
                   S[        U5      R
                   35      e[        TU ]  XU5        g ©Nr,   z, z, and )r   r   r   r
   r-   r!   r.   r/   ©r1   r2   rM   r3   r4   s       €r'   r/   ÚConvBnReLU1d.__init__”   óˆ   ø€ ä(¨Ó.´&Ó8Ü,¨RÓ0´KÓ?Ü,¨TÓ2´dÓ:ä Ø5Ü/°Ó5×>Ñ>Ð?¸rÜ/°Ó3×<Ñ<Ð=¸VÜ/°Ó5×>Ñ>Ð?ðAóð ô 	‰Ñ˜ 4Õ(r&   r    r7   r:   s   @r'   r   r   �   ó   ø† ñV÷)ó )r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é£   z§This is a sequential container which calls the Conv 2d, Batch Norm 2d, and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c           
      ó2  >• [        U5      [        :X  a&  [        U5      [        :X  a  [        U5      [        :X  dM  [	        S[        U5      R
                   S[        U5      R
                   S[        U5      R
                   35      e[        TU ]  XU5        g rX   )r   r   r   r
   r-   r!   r.   r/   rY   s       €r'   r/   ÚConvBnReLU2d.__init__§   r[   r&   r    r7   r:   s   @r'   r   r   £   r\   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   é¶   z This is a sequential container which calls the Conv 3d and Batch Norm 3d modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r   r-   r!   r.   r/   rL   s      €r'   r/   ÚConvBn3d.__init__º   rO   r&   r    r7   r:   s   @r'   r   r   ¶   rP   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   éÇ   z§This is a sequential container which calls the Conv 3d, Batch Norm 3d, and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c           
      ó2  >• [        U5      [        :X  a&  [        U5      [        :X  a  [        U5      [        :X  dM  [	        S[        U5      R
                   S[        U5      R
                   S[        U5      R
                   35      e[        TU ]  XU5        g rX   )r   r   r   r
   r-   r!   r.   r/   rY   s       €r'   r/   ÚConvBnReLU3d.__init__Ë   r[   r&   r    r7   r:   s   @r'   r   r   Ç   r\   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   éÚ   zœThis is a sequential container which calls the BatchNorm 2d and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r
   r-   r!   r.   r/   ©r1   Ú
batch_normr3   r4   s      €r'   r/   ÚBNReLU2d.__init__Þ   óf   ø€ ä(¨Ó4¼ÓCÜ,¨TÓ2´dÓ:ä Ø5Ü/°
Ó;×DÑDÐEÀUÜ/°Ó5×>Ñ>Ð?ðAóð ô
 	‰Ñ˜Õ*r&   r    r7   r:   s   @r'   r   r   Ú   ó   ø† ñV÷
+ó 
+r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   éë   zœThis is a sequential container which calls the BatchNorm 3d and ReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r   r
   r-   r!   r.   r/   rl   s      €r'   r/   ÚBNReLU3d.__init__ï   ro   r&   r    r7   r:   s   @r'   r   r   ë   rp   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   éü   z�This is a sequential container which calls the Linear and BatchNorm1d modules.
During quantization this will be replaced with the corresponding fused module.c                 óÞ   >• [        U5      [        :X  a  [        U5      [        :X  d7  [        S[        U5      R                   S[        U5      R                   35      e[
        TU ]  X5        g r+   )r   r	   r   r-   r!   r.   r/   )r1   rG   rM   r4   s      €r'   r/   ÚLinearBn1d.__init__   se   ø€ ä(¨Ó0´FÓ:Ü,¨RÓ0´KÓ?ä Ø5Ü/°Ó7×@Ñ@ÐAÀÜ/°Ó3×<Ñ<Ð=ð?óð ô
 	‰Ñ˜Õ$r&   r    r7   r:   s   @r'   r   r   ü   r;   r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   i  z›This is a sequential container which calls the Linear and LeakyReLU modules.
During quantization this will be replaced with the corresponding fused module.c                 ó  >• [        U5      [        L a&  [        U5      [        R                  R                  L d7  [        S[        U5      R                   S[        U5      R                   35      e[        TU ]!  X5        g r+   )	Útyper	   ÚtorchÚnnÚ	LeakyReLUr-   r!   r.   r/   )r1   rG   Ú
leaky_relur4   s      €r'   r/   ÚLinearLeakyReLU.__init__  sl   ø€ Ü�V“¤Ò&¬4°
Ó+;¼u¿x¹x×?QÑ?QÒ+QÜ Ø5Ü˜“<×(Ñ(Ð)¨¬t°JÓ/?×/HÑ/HÐ.IðKóð ô 	‰Ñ˜Õ,r&   r    r7   r:   s   @r'   r   r     s   ø† ñV÷-ó -r&   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r   i  z–This is a sequential container which calls the Linear and Tanh modules.
During quantization this will be replaced with the corresponding fused module.c                 ó  >• [        U5      [        L a&  [        U5      [        R                  R                  L d7  [        S[        U5      R                   S[        U5      R                   35      e[        TU ]!  X5        g r+   )	r{   r	   r|   r}   ÚTanhr-   r!   r.   r/   )r1   rG   Útanhr4   s      €r'   r/   ÚLinearTanh.__init__  sh   ø€ Ü�V“¤Ò&¬4°«:¼¿¹¿¹Ò+FÜ Ø5Ü˜“<×(Ñ(Ð)¨¬t°D«z×/BÑ/BÐ.CðEóð ô 	‰Ñ˜Õ&r&   r    r7   r:   s   @r'   r   r     s   ø† ñV÷'ó 'r&   r   c                   ó2   ^ • \ rS rSrSrU 4S jrS rSrU =r$ )r   i'  zœThis is a sequential container which calls the Conv2d modules with extra Add.
During quantization this will be replaced with the corresponding fused module.c                 ó0   >• [         TU ]  U5        X l        g ©N)r.   r/   Úadd)r1   r2   r‰   r4   s      €r'   r/   ÚConvAdd2d.__init__+  s   ø€ Ü‰Ñ˜ÔØ�r&   c                 ó8   • U R                  U S   " U5      U5      $ )z4Applies convolution to x1 and adds the result to x2.r   ©r‰   ©r1   Úx1Úx2s      r'   ÚforwardÚConvAdd2d.forward/  s   € à�x‰x˜˜Qš › RÓ(Ð(r&   rŒ   ©	r!   r"   r#   r$   r8   r/   r�   r%   r9   r:   s   @r'   r   r   '  s   ø† ñVõ÷)ð )r&   r   c                   ó2   ^ • \ rS rSrSrU 4S jrS rSrU =r$ )r   i4  z�This is a sequential container which calls the Conv2d, add, Relu.
During quantization this will be replaced with the corresponding fused module.c                 ó<   >• [         TU ]  U5        X l        X0l        g rˆ   )r.   r/   r‰   r3   )r1   r2   r‰   r3   r4   s       €r'   r/   ÚConvAddReLU2d.__init__8  s   ø€ Ü‰Ñ˜ÔØŒØ�	r&   c                 óV   • U R                  U R                  U S   " U5      U5      5      $ )zCApplies convolution to x1, adds the result to x2, and applies ReLU.r   )r3   r‰   r�   s      r'   r�   ÚConvAddReLU2d.forward=  s$   € à�y‰y˜Ÿ™ $ q¢'¨"£+¨rÓ2Ó3Ð3r&   )r‰   r3   r’   r:   s   @r'   r   r   4  s   ø† ñVõ÷
4ð 4r&   r   )!r|   Útorch.nnr   r   r   r   r   r   r	   r
   Útorch.nn.utils.parametrizer   Ú__all__r}   Ú
Sequentialr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r&   r'   Ú<module>rœ      s  ðã ÷	÷ 	ó 	õ Dò€ô,	�5—8‘8×&Ñ&ô 	ô%�ô %ô"%�ô %ô"%�ô %ô"'�ô 'ô"#ˆ|ô #ô"#ˆ|ô #ô")�<ô )ô&)�<ô )ô&#ˆ|ô #ô")�<ô )ô&+ˆ|ô +ô"+ˆ|ô +ô"%�ô %ô"
-�lô 
-ô
'�ô 
'ô
)�ô 
)ô4�Lõ 4r&   