+
    ˜°³ja  ã                  ó–   € ^ RI Ht ^ RIt^ RIHt ^ RIt. ROt]! RRR7      t]! RRR7      tRR	 R
 llt	RR R llt
R R ltR R ltR# )é    )ÚannotationsN)ÚTypeVarÚConvTztorch.nn.modules.conv._ConvNd)ÚboundÚLinearTztorch.nn.Linearc               ó(   € V ^8„  d   QhRRRRRRRR/# )é   Úconvr   Úbnú%torch.nn.modules.batchnorm._BatchNormÚ	transposeÚboolÚreturn© )Úformats   "ÚV/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/nn/utils/fusion.pyÚ__annotate__r      s0   € ÷ #ñ #Ø
ð#à-ð#ð ð#ð ñ	#ó    c           
     ó¨  € V P                   '       g   VP                   '       d   \        R4      h\        P                  ! V 4      pVP                  e   VP
                  f   \        R4      h\        VP                  VP                  VP                  VP
                  VP                  VP                  VP                  V4      w  Vn        Vn        V# )a  Fuse a convolutional module and a BatchNorm module into a single, new convolutional module.

Args:
    conv (torch.nn.modules.conv._ConvNd): A convolutional module.
    bn (torch.nn.modules.batchnorm._BatchNorm): A BatchNorm module.
    transpose (bool, optional): If True, transpose the convolutional weight. Defaults to False.

Returns:
    torch.nn.modules.conv._ConvNd: The fused convolutional module.

.. note::
    Both ``conv`` and ``bn`` must be in eval mode, and ``bn`` must have its running buffers computed.
úFusion only for eval!ú3bn.running_mean and bn.running_var must not be None)
ÚtrainingÚAssertionErrorÚcopyÚdeepcopyÚrunning_meanÚrunning_varÚfuse_conv_bn_weightsÚweightÚbiasÚeps)r
   r   r   Ú
fused_convs   &&& r   Úfuse_conv_bn_evalr#      s    € ð$ ‡}‡}€}˜ŸŸ˜ÜÐ4Ó5Ð5Ü—’˜tÓ$€Jà	‡�Ò "§.¡.Ò"8ÜÐRÓSÐSÜ)=Ø×ÑØ�‰Ø
�‰Ø
�‰Ø
�‰Ø
�	‰	Ø
�‰Øó	*Ñ&€JÔ�z”ð Ðr   c               ó<   € V ^8„  d   QhRRRRRRRRRRR	RR
RRRRR/	# )r	   Úconv_wútorch.TensorÚconv_bútorch.Tensor | NoneÚbn_rmÚbn_rvÚbn_epsÚfloatÚbn_wÚbn_br   r   r   ú-tuple[torch.nn.Parameter, torch.nn.Parameter]r   )r   s   "r   r   r   :   sb   € ÷ 2ñ 2Øð2àð2ð ð2ð ð	2ð
 ð2ð ð2ð ð2ð ð2ð 3ñ2r   c                ó2  € V P                   pVe   VP                   MTp	Vf   \        P                  ! V4      pVf   \        P                  ! V4      pVf   \        P                  ! V4      p\        P                  ! W4,           4      p
V'       d/   ^R.^.\        V P                  4      ^,
          ,          ,           pM-R^.^.\        V P                  4      ^,
          ,          ,           pWV
,          P                  V4      ,          P                  VR7      pW,
          V
,          V,          V,           P                  V	R7      p\        P                  P                  WÀP                  4      \        P                  P                  WÑP                  4      3# )a�  Fuse convolutional module parameters and BatchNorm module parameters into new convolutional module parameters.

Args:
    conv_w (torch.Tensor): Convolutional weight.
    conv_b (Optional[torch.Tensor]): Convolutional bias.
    bn_rm (torch.Tensor): BatchNorm running mean.
    bn_rv (torch.Tensor): BatchNorm running variance.
    bn_eps (float): BatchNorm epsilon.
    bn_w (Optional[torch.Tensor]): BatchNorm weight.
    bn_b (Optional[torch.Tensor]): BatchNorm bias.
    transpose (bool, optional): If True, transpose the conv weight. Defaults to False.

Returns:
    Tuple[torch.nn.Parameter, torch.nn.Parameter]: Fused convolutional weight and bias.
©Údtypeéÿÿÿÿ)r2   ÚtorchÚ
zeros_likeÚ	ones_likeÚrsqrtÚlenÚshapeÚreshapeÚtoÚnnÚ	ParameterÚrequires_grad)r%   r'   r)   r*   r+   r-   r.   r   Úconv_weight_dtypeÚconv_bias_dtypeÚbn_var_rsqrtr9   Úfused_conv_wÚfused_conv_bs   &&&&&&&&      r   r   r   :   sI  € ð2 Ÿ™ÐØ&,Ò&8�f—l’lÐ>O€OØ‚~Ü×!Ò! %Ó(ˆØ‚|Ü�Š˜uÓ%ˆØ‚|Ü×Ò Ó&ˆÜ—;’;˜u�~Ó.€LçØ�B�˜1˜#¤ V§\¡\Ó!2°QÕ!6Õ7Õ7‰à�Q�˜1˜#¤ V§\¡\Ó!2°QÕ!6Õ7Õ7ˆà \Õ1×:Ñ:¸5ÓAÕA×EÑEØð Fó €Lð •^ |Õ3°dÕ:¸TÕA×EÑEØð Fó €Lô
 	�‰×Ñ˜<×)=Ñ)=Ó>Ü�‰×Ñ˜<×)=Ñ)=Ó>ðð r   c               ó$   € V ^8„  d   QhRRRRRR/# )r	   Úlinearr   r   r   r   r   )r   s   "r   r   r   o   s&   € ÷ 0ñ 0Øð0à-ð0ð ñ0r   c           	     óJ  € V P                   '       g   VP                   '       d   \        R4      h\        P                  ! V 4      p V P                  VP
                  8w  d7   VP
                  ^8w  d&   \        RV P                   RVP
                   24      hVP                  e   VP                  f   \        R4      h\        VP                  VP                  VP                  VP                  VP                  VP                  VP                  4      w  Vn	        Vn
        V# )as  Fuse a linear module and a BatchNorm module into a single, new linear module.

Args:
    linear (torch.nn.Linear): A Linear module.
    bn (torch.nn.modules.batchnorm._BatchNorm): A BatchNorm module.

Returns:
    torch.nn.Linear: The fused linear module.

.. note::
    Both ``linear`` and ``bn`` must be in eval mode, and ``bn`` must have its running buffers computed.
r   zaTo fuse, linear.out_features == bn.num_features or bn.num_features == 1, got linear.out_features=z and bn.num_features=r   )r   r   r   r   Úout_featuresÚnum_featuresr   r   Úfuse_linear_bn_weightsr   r    r!   )rE   r   Úfused_linears   && r   Úfuse_linear_bn_evalrK   o   sù   € ð  ‡‡€˜"Ÿ+Ÿ+˜+ÜÐ4Ó5Ð5Ü—=’= Ó(€Lð	ð ×Ñ˜bŸo™oÔ-°"·/±/ÀQÔ2FÜð'Ø'-×':Ñ':Ð&;Ð;PÐQS×Q`ÑQ`ÐPaðcó
ð 	
ð
 
‡�Ò "§.¡.Ò"8ÜÐRÓSÐSÜ-CØ×ÑØ×ÑØ
�‰Ø
�‰Ø
�‰Ø
�	‰	Ø
�‰ó.Ñ*€LÔ˜Ô*ð Ðr   c               ó8   € V ^8„  d   QhRRRRRRRRRRR	RR
RRR/# )r	   Úlinear_wr&   Úlinear_br(   r)   r*   r+   r,   r-   r.   r   r/   r   )r   s   "r   r   r   ¢   sX   € ÷ "ñ "Øð"à!ð"ð ð"ð ð	"ð
 ð"ð ð"ð ð"ð 3ñ"r   c                óö  € V P                   pVe   VP                   MTpVf   \        P                  ! V4      pV\        P                  ! W4,           4      ,          p	W	P	                  R4      P                  VR7      ,          p
W,
          V	,          V,           P                  VR7      p\        P                  P                  W P                  4      \        P                  P                  W±P                  4      3# )a  Fuse linear module parameters and BatchNorm module parameters into new linear module parameters.

Args:
    linear_w (torch.Tensor): Linear weight.
    linear_b (Optional[torch.Tensor]): Linear bias.
    bn_rm (torch.Tensor): BatchNorm running mean.
    bn_rv (torch.Tensor): BatchNorm running variance.
    bn_eps (float): BatchNorm epsilon.
    bn_w (torch.Tensor): BatchNorm weight.
    bn_b (torch.Tensor): BatchNorm bias.

Returns:
    Tuple[torch.nn.Parameter, torch.nn.Parameter]: Fused linear weight and bias.
r1   r3   )	r2   r4   r5   r7   Ú	unsqueezer;   r<   r=   r>   )rM   rN   r)   r*   r+   r-   r.   Úlinear_weight_dtypeÚlinear_bias_dtypeÚbn_scaleÚfused_wÚfused_bs   &&&&&&&     r   rI   rI   ¢   sË   € ð. #Ÿ.™.ÐØ*2Ò*>˜ŸšÐDWÐØÒÜ×#Ò# EÓ*ˆØ”e—k’k %¥.Ó1Õ1€Hà×+Ñ+¨BÓ/×2Ñ2Ð9LÐ2ÓMÕM€GØÕ  HÕ,¨tÕ3×7Ñ7Ð>OÐ7ÓP€Gä�8‰8×Ñ˜g×'=Ñ'=Ó>ÄÇÁ×@RÑ@RØ×'Ñ'óAð ð r   )r#   r   rK   rI   )F)Ú
__future__r   r   Útypingr   r4   Ú__all__r   r   r#   r   rK   rI   r   r   r   Ú<module>rY      sK   ðÝ "ã Ý ã ò€ñ 	�Ð>Ô?€Ù
�)Ð#4Ô
5€÷#÷L2õj0÷f"r   