
    8hM(                        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        ]/var/www/fran/franai/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   *   zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g Nz!Incorrect types for input modules)r   r   r
   super__init__selfconvrelu	__class__s      r'   r-   ConvReLU1d.__init__.   [    (.&8,T2d:	
 00LT0R/S+D124		
; 	$r&   r    r!   r"   r#   r$   __doc__r-   r%   __classcell__r2   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   9   zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r
   r,   r-   r.   s      r'   r-   ConvReLU2d.__init__=   r4   r&   r    r5   r8   s   @r'   r   r   9   r9   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r   H   zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r
   r,   r-   r.   s      r'   r-   ConvReLU3d.__init__L   r4   r&   r    r5   r8   s   @r'   r   r   H   r9   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r   W   zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r	   r
   r,   r-   )r/   linearr1   r2   s      r'   r-   LinearReLU.__init__[   s[    (0F:,T2d:	
 00LV0T/U+D124		
; 	&r&   r    r5   r8   s   @r'   r   r   W   s    V' 'r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r   f   zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r   r,   r-   r/   r0   bnr2   s      r'   r-   ConvBn1d.__init__j   \    (.&8,R0K?	
 00LT0R/S+B/02		
@ 	"r&   r    r5   r8   s   @r'   r   r   f       V# #r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r   u   zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r   r,   r-   rJ   s      r'   r-   ConvBn2d.__init__y   rM   r&   r    r5   r8   s   @r'   r   r   u   rN   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      zThis 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                    > [        U5      [        :X  a&  [        U5      [        :X  a  [        U5      [        :X  d)   S[        U5       [        U5       [        U5       35       e[        TU ]  XU5        g r+   )r   r   r   r
   r,   r-   r/   r0   rK   r1   r2   s       r'   r-   ConvBnReLU1d.__init__   u    (.&8,R0K?,T2d:	

 00LT0R/S+B/0+D124	
; 	4(r&   r    r5   r8   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      zThis 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                    > [        U5      [        :X  a&  [        U5      [        :X  a  [        U5      [        :X  d)   S[        U5       [        U5       [        U5       35       e[        TU ]  XU5        g r+   )r   r   r   r
   r,   r-   rV   s       r'   r-   ConvBnReLU2d.__init__   rX   r&   r    r5   r8   s   @r'   r   r      rY   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r   r,   r-   rJ   s      r'   r-   ConvBn3d.__init__   rM   r&   r    r5   r8   s   @r'   r   r      rN   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      zThis 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                    > [        U5      [        :X  a&  [        U5      [        :X  a  [        U5      [        :X  d)   S[        U5       [        U5       [        U5       35       e[        TU ]  XU5        g r+   )r   r   r   r
   r,   r-   rV   s       r'   r-   ConvBnReLU3d.__init__   rX   r&   r    r5   r8   s   @r'   r   r      rY   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r
   r,   r-   r/   
batch_normr1   r2   s      r'   r-   BNReLU2d.__init__   [    (4C,T2d:	
 00LZ0X/Y+D124		
; 	*r&   r    r5   r8   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      zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r   r
   r,   r-   ri   s      r'   r-   BNReLU3d.__init__   rl   r&   r    r5   r8   s   @r'   r   r      rm   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      zThis 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  d   S[        U5       [        U5       35       e[        TU ]  X5        g r+   )r   r	   r   r,   r-   )r/   rE   rK   r2   s      r'   r-   LinearBn1d.__init__   s\    (0F:,R0K?	
 00LV0T/U+B/02		
@ 	$r&   r    r5   r8   s   @r'   r   r      r9   r&   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      zThis 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      [        :X  a'  [        U5      [        R                  R                  :X  d   S[        U5       [        U5       35       e[
        TU ]  X5        g r+   )typer	   torchnn	LeakyReLUr,   r-   )r/   rE   
leaky_relur2   s      r'   r-   LinearLeakyReLU.__init__   sY    F|v%$z*:ehh>P>P*P 	
/V~d:>N=OP	
P 	,r&   r    r5   r8   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      zThis 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      [        :X  a'  [        U5      [        R                  R                  :X  d   S[        U5       [        U5       35       e[
        TU ]  X5        g r+   )ry   r	   rz   r{   Tanhr,   r-   )r/   rE   tanhr2   s      r'   r-   LinearTanh.__init__  sT    F|v%$t**E 	
/V~d4j\J	
E 	&r&   r    r5   r8   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	  zThis 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)r/   r0   r   r2   s      r'   r-   ConvAdd2d.__init__  s    r&   c                 8    U R                  U S   " U5      U5      $ Nr   r   r/   x1x2s      r'   forwardConvAdd2d.forward  s    xxQR((r&   r   	r!   r"   r#   r$   r6   r-   r   r%   r7   r8   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  zThis 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   r1   )r/   r0   r   r1   r2   s       r'   r-   ConvAddReLU2d.__init__  s    	r&   c                 V    U R                  U R                  U S   " U5      U5      5      $ r   )r1   r   r   s      r'   r   ConvAddReLU2d.forward  s$    yy$q'"+r233r&   )r   r1   r   r8   s   @r'   r   r     s    V
4 4r&   r   )!rz   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,	588&& 	% %% %% %' '#| ##| #)< )")< )"#| #)< )"+| ++| +% %-l -' '	) 	)
4L 
4r&   