+
    ˜°³jU5  ã                   ó²  € ^ RI Ht ^ RIHt ^ RIt^ RIHu Ht ^ RIHt  ! R R]4      t	 ! R R]P                  4      tR	 R
 lt ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R ]P                  4      t ! R! R"]P                  4      t ! R# R$]P                  4      tR# )%é    )ÚAny)ÚBaseSparsifierN)Únnc                   óP   a a€ ] tR t^	t oV3R lV 3R lltV3R lR ltRtVtV ;t# )ÚImplementedSparsifierc                ó:   <€ V ^8„  d   QhRS[ S[S[3,          RR/# )é   ÚkwargsÚreturnN)ÚdictÚstrr   )ÚformatÚ__classdict__s   "€Úg/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/testing/_internal/common_pruning.pyÚ__annotate__Ú"ImplementedSparsifier.__annotate__
   s#   ø€ ÷ *ñ *¡¡c©3 h¥ð *°Dñ *ó    c                ó(   <€ \         SV `  VR 7       R# ))ÚdefaultsN)ÚsuperÚ__init__)Úselfr
   Ú	__class__s   &,€r   r   ÚImplementedSparsifier.__init__
   s   ø€ Ü‰Ñ &ÐÖ)r   c                óZ   <€ V ^8„  d   QhRS[ P                  RS[RS[S[S[3,          RR/# )r	   ÚmoduleÚtensor_namer
   r   N)r   ÚModuler   r   r   )r   r   s   "€r   r   r      s=   ø€ ÷ Kñ K¡"§)¡)ð K¹#ð KÉÉcÑSVÈhÍð KÐ\`ñ Kr   c                ó¸   € ^ VP                   P                  ^ ,          P                  ^ &   V P                  R,          pVP	                  R^ 4      ^,           VR&   R# )r   zlinear1.weightÚ
step_countN)ÚparametrizationsÚweightÚmaskÚstateÚget)r   r   r   r
   Úlinear_states   &&&, r   Úupdate_maskÚ!ImplementedSparsifier.update_mask   sN   € Ø45ˆ×Ñ×&Ñ& qÕ)×.Ñ.¨qÑ1Ø—z‘zÐ"2Õ3ˆØ%1×%5Ñ%5°lÀAÓ%FÈÕ%Jˆ�\Ó"r   © )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r'   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r   r   s   @@r   r   r   	   s!   ù‡ € ÷*ó *÷K÷ Kð Kr   r   c                   ó@   a € ] tR t^t o Rt]V 3R lR l4       tRtV tR# )ÚMockSparseLinearz»
This class is a MockSparseLinear class to check convert functionality.
It is the same as a normal Linear layer, except with a different type, as
well as an additional from_dense method.
c                ó8   <€ V ^8„  d   QhRS[ P                  RR/# )r	   Úmodr   r3   )r   ÚLinear)r   r   s   "€r   r   ÚMockSparseLinear.__annotate__   s    ø€ ÷ ñ ™RŸY™Yð Ð+=ñ r   c                ó@   € V ! VP                   VP                  4      pV# )z	
        )Úin_featuresÚout_features)Úclsr5   Úlinears   && r   Ú
from_denseÚMockSparseLinear.from_dense   s"   € ñ �S—_‘_Ø×%Ñ%ó'ˆàˆr   r)   N)	r*   r+   r,   r-   Ú__doc__Úclassmethodr=   r.   r/   )r   s   @r   r3   r3      s   ø‡ € ñð
 ÷ó ör   r3   c                ód   € V ^8„  d   QhR\         P                  R\         P                  R\        /# )r	   Úsubset_tensorÚsuperset_tensorr   )ÚtorchÚTensorÚbool)r   s   "r   r   r   "   s*   € ÷ ñ ¤5§<¡<ð Ä%Ç,Á,ð ÔSWñ r   c                óž   € ^ pV  FD  pV\        V4      8  d1   \        P                  ! W1V,          4      '       g   V^,          pK>  KC   R# 	  R# )zO
Checks to see if all rows in subset tensor are present in the superset tensor
FT)ÚlenrD   Úequal)rB   rC   ÚiÚrows   &&  r   Úrows_are_subsetrL   "   sH   € ð 	
€AÛˆØ”#�oÓ&Ô&Ü—;’;˜s°AÕ$6×7Ò7Ø�Q•’áâñ ñ r   c                   óT   a a€ ] tR t^2t oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚSimpleLinearzšModel with only Linear layers without biases, some wrapped in a Sequential,
some following the Sequential. Used to test basic pruned Linear-Linear fusion.c                ó   <€ V ^8„  d   QhRR/# ©r	   r   Nr)   )r   r   s   "€r   r   ÚSimpleLinear.__annotate__6   s   ø€ ÷ 4ñ 4˜$ñ 4r   c           
     ó`  <€ \         SV `  4        \        P                  ! \        P                  ! ^^RR7      \        P                  ! ^^RR7      \        P                  ! ^^RR7      4      V n        \        P                  ! ^^RR7      V n        \        P                  ! ^^
RR7      V n        R# )é   F©ÚbiasN)r   r   r   Ú
Sequentialr6   ÚseqÚlinear1Úlinear2©r   r   s   &€r   r   ÚSimpleLinear.__init__6   sx   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜ Ô'Ü�IŠI�a˜ Ô'Ü�IŠI�a˜ Ô'ó
ˆŒô
 —y’y  A¨EÔ2ˆŒÜ—y’y  B¨UÔ3ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# ©r	   Úxr   ©rD   rE   )r   r   s   "€r   r   rQ   @   ó#   ø€ ÷ ñ ™Ÿ™ð ©%¯,©,ñ r   c                ól   € V P                  V4      pV P                  V4      pV P                  V4      pV# ©N)rW   rX   rY   ©r   r^   s   &&r   ÚforwardÚSimpleLinear.forward@   ó.   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆØ�L‰L˜‹OˆØˆr   )rX   rY   rW   ©
r*   r+   r,   r-   r?   r   rd   r.   r/   r0   r1   s   @@r   rN   rN   2   s$   ù‡ € ñV÷4ó 4÷÷ ð r   rN   c                   óT   a a€ ] tR t^Gt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )Ú
LinearBiasz†Model with only Linear layers, alternating layers with biases,
wrapped in a Sequential. Used to test pruned Linear-Bias-Linear fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚLinearBias.__annotate__K   s   ø€ ÷ 
ñ 
˜$ñ 
r   c                óH  <€ \         SV `  4        \        P                  ! \        P                  ! ^^RR7      \        P                  ! ^^RR7      \        P                  ! ^^RR7      \        P                  ! ^^RR7      \        P                  ! ^^
RR7      4      V n        R# ©rS   TrT   FN)r   r   r   rV   r6   rW   rZ   s   &€r   r   ÚLinearBias.__init__K   sn   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜ Ô&Ü�IŠI�a˜ Ô'Ü�IŠI�a˜ Ô&Ü�IŠI�a˜ Ô&Ü�IŠI�a˜ %Ô(ó
ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   rk   U   s#   ø€ ÷ ñ ™Ÿ™ð ©%¯,©,ñ r   c                ó(   € V P                  V4      pV# rb   ©rW   rc   s   &&r   rd   ÚLinearBias.forwardU   s   € Ø�H‰H�Q‹KˆØˆr   rq   rg   r1   s   @@r   ri   ri   G   s$   ù‡ € ñO÷
ó 
÷÷ ð r   ri   c                   óT   a a€ ] tR t^Zt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚLinearActivationzñModel with only Linear layers, some with bias, some in a Sequential and some following.
Activation functions modules in between each Linear in the Sequential, and each outside layer.
Used to test pruned Linear(Bias)-Activation-Linear fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚLinearActivation.__annotate___   ó   ø€ ÷ ñ ˜$ñ r   c                ó  <€ \         SV `  4        \        P                  ! \        P                  ! ^^RR7      \        P
                  ! 4       \        P                  ! ^^RR7      \        P                  ! 4       \        P                  ! ^^RR7      4      V n        \        P                  ! ^^RR7      V n        \        P
                  ! 4       V n	        \        P                  ! ^^
RR7      V n
        \        P                  ! 4       V n        R# rm   )r   r   r   rV   r6   ÚReLUÚTanhrW   rX   Úact1rY   Úact2rZ   s   &€r   r   ÚLinearActivation.__init___   s¤   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜ Ô&Ü�GŠG‹IÜ�IŠI�a˜ Ô'Ü�GŠG‹IÜ�IŠI�a˜ Ô&ó
ˆŒô —y’y  A¨DÔ1ˆŒÜ—G’G“IˆŒ	Ü—y’y  B¨UÔ3ˆŒÜ—G’G“IˆŽ	r   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   rv   m   ó#   ø€ ÷ ñ ™Ÿ™ð ©%¯,©,ñ r   c                ó°   € V P                  V4      pV P                  V4      pV P                  V4      pV P                  V4      pV P	                  V4      pV# rb   )rW   rX   r{   rY   r|   rc   s   &&r   rd   ÚLinearActivation.forwardm   óH   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆØ�I‰I�a‹LˆØ�L‰L˜‹OˆØ�I‰I�a‹LˆØˆr   )r{   r|   rX   rY   rW   rg   r1   s   @@r   rt   rt   Z   s$   ù‡ € ñB÷ó ÷÷ ð r   rt   c                   óT   a a€ ] tR t^vt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚLinearActivationFunctionala  Model with only Linear layers, some with bias, some in a Sequential and some following.
Activation functions modules in between each Linear in the Sequential, and functional
activations are called in between each outside layer.
Used to test pruned Linear(Bias)-Activation-Linear fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   Ú'LinearActivationFunctional.__annotate__|   rw   r   c                ó   <€ \         SV `  4        \        P                  ! \        P                  ! ^^RR7      \        P
                  ! 4       \        P                  ! ^^RR7      \        P
                  ! 4       \        P                  ! ^^RR7      4      V n        \        P                  ! ^^RR7      V n        \        P                  ! ^^RR7      V n        \        P                  ! ^^
RR7      V n	        \        P
                  ! 4       V n
        R# rm   )r   r   r   rV   r6   ry   rW   rX   rY   Úlinear3r{   rZ   s   &€r   r   Ú#LinearActivationFunctional.__init__|   s«   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜ Ô&Ü�GŠG‹IÜ�IŠI�a˜ Ô'Ü�GŠG‹IÜ�IŠI�a˜ Ô&ó
ˆŒô —y’y  A¨DÔ1ˆŒÜ—y’y  A¨EÔ2ˆŒÜ—y’y  B¨UÔ3ˆŒÜ—G’G“IˆŽ	r   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   r†   Š   s#   ø€ ÷ ñ ™Ÿ™ð ©%¯,©,ñ r   c                ó  € V P                  V4      pV P                  V4      p\        P                  ! V4      pV P	                  V4      p\        P                  ! V4      pV P                  V4      p\        P                  ! V4      pV# rb   )rW   rX   ÚFÚrelurY   rˆ   rc   s   &&r   rd   Ú"LinearActivationFunctional.forwardŠ   sb   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆÜ�FŠF�1‹IˆØ�L‰L˜‹OˆÜ�FŠF�1‹IˆØ�L‰L˜‹OˆÜ�FŠF�1‹IˆØˆr   )r{   rX   rY   rˆ   rW   rg   r1   s   @@r   r„   r„   v   s$   ù‡ € ñB÷
ó ÷÷ ð r   r„   c                   óT   a a€ ] tR t^•t oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚSimpleConv2dzƒModel with only Conv2d layers, all without bias, some in a Sequential and some following.
Used to test pruned Conv2d-Conv2d fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚSimpleConv2d.__annotate__™   s   ø€ ÷ ;ñ ;˜$ñ ;r   c                ó@  <€ \         SV `  4        \        P                  ! \        P                  ! ^^ ^^RR7      \        P                  ! ^ ^@^^RR7      4      V n        \        P                  ! ^@^0^^RR7      V n        \        P                  ! ^0^4^^RR7      V n        R# )é   FrT   N©r   r   r   rV   ÚConv2drW   Úconv2d1Úconv2d2rZ   s   &€r   r   ÚSimpleConv2d.__init__™   sx   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜˜Q ¨Ô.Ü�IŠI�b˜"˜a ¨Ô/ó
ˆŒô —y’y  R¨¨A°EÔ:ˆŒÜ—y’y  R¨¨A°EÔ:ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   r’   ¢   r`   r   c                ól   € V P                  V4      pV P                  V4      pV P                  V4      pV# rb   ©rW   r—   r˜   rc   s   &&r   rd   ÚSimpleConv2d.forward¢   rf   r   ©r—   r˜   rW   rg   r1   s   @@r   r�   r�   •   s#   ù‡ € ñ1÷;ó ;÷÷ ð r   r�   c                   óT   a a€ ] tR t^©t oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )Ú
Conv2dBiasz„Model with only Conv2d layers, some with bias, some in a Sequential and some outside.
Used to test pruned Conv2d-Bias-Conv2d fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚConv2dBias.__annotate__­   s   ø€ ÷ ;ñ ;˜$ñ ;r   c                ót  <€ \         SV `  4        \        P                  ! \        P                  ! ^^ ^^RR7      \        P                  ! ^ ^ ^^RR7      \        P                  ! ^ ^@^^RR7      4      V n        \        P                  ! ^@^0^^RR7      V n        \        P                  ! ^0^4^^RR7      V n        R# ©r”   TrT   FNr•   rZ   s   &€r   r   ÚConv2dBias.__init__­   sŒ   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜˜Q ¨Ô-Ü�IŠI�b˜"˜a ¨Ô.Ü�IŠI�b˜"˜a ¨Ô/ó
ˆŒô
 —y’y  R¨¨A°DÔ9ˆŒÜ—y’y  R¨¨A°EÔ:ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   r¢   ·   r`   r   c                ól   € V P                  V4      pV P                  V4      pV P                  V4      pV# rb   rœ   rc   s   &&r   rd   ÚConv2dBias.forward·   rf   r   rž   rg   r1   s   @@r   r    r    ©   s#   ù‡ € ñ6÷;ó ;÷÷ ð r   r    c                   óT   a a€ ] tR t^¾t oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚConv2dActivationa  Model with only Conv2d layers, some with bias, some in a Sequential and some following.
Activation function modules in between each Sequential layer, functional activations called
in-between each outside layer.
Used to test pruned Conv2d-Bias-Activation-Conv2d fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚConv2dActivation.__annotate__Ä   s   ø€ ÷ :ñ :˜$ñ :r   c                óì  <€ \         SV `  4        \        P                  ! \        P                  ! ^^ ^^RR7      \        P
                  ! 4       \        P                  ! ^ ^@^^RR7      \        P                  ! 4       \        P                  ! ^@^@^^RR7      \        P
                  ! 4       4      V n        \        P                  ! ^@^0^^RR7      V n        \        P                  ! ^0^4^^RR7      V n	        R# r¤   )
r   r   r   rV   r–   ry   rz   rW   r—   r˜   rZ   s   &€r   r   ÚConv2dActivation.__init__Ä   s§   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜˜Q ¨Ô-Ü�GŠG‹IÜ�IŠI�b˜"˜a ¨Ô.Ü�GŠG‹IÜ�IŠI�b˜"˜a ¨Ô/Ü�GŠG‹Ió
ˆŒô —y’y  R¨¨A°EÔ:ˆŒÜ—y’y  R¨¨A°DÔ9ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   r¬   Ñ   r   r   c                óÄ   € V P                  V4      pV P                  V4      p\        P                  ! V4      pV P	                  V4      p\        P
                  ! V4      pV# rb   )rW   r—   rŒ   r�   r˜   Úhardtanhrc   s   &&r   rd   ÚConv2dActivation.forwardÑ   sH   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆÜ�FŠF�1‹IˆØ�L‰L˜‹OˆÜ�JŠJ�q‹MˆØˆr   rž   rg   r1   s   @@r   rª   rª   ¾   s$   ù‡ € ñA÷
:ó :÷÷ ð r   rª   c                   óT   a a€ ] tR t^Út oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚConv2dPadBiasaE  Model with only Conv2d layers, all with bias and some with padding > 0,
some in a Sequential and some following. Activation function modules in between each layer.
Used to test that bias is propagated correctly in the special case of
pruned Conv2d-Bias-(Activation)Conv2d fusion, when the second Conv2d layer has padding > 0.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚConv2dPadBias.__annotate__à   s   ø€ ÷ ñ ˜$ñ r   c                ó  <€ \         SV `  4        \        P                  ! \        P                  ! ^^ ^^^RR7      \        P
                  ! 4       \        P                  ! ^ ^ ^^RR7      \        P
                  ! 4       \        P                  ! ^ ^ ^^^RR7      \        P
                  ! 4       \        P                  ! ^ ^ ^^^RR7      \        P
                  ! 4       \        P                  ! ^ ^@^^RR7      \        P                  ! 4       4
      V n        \        P                  ! ^@^0^^^RR7      V n        \        P
                  ! 4       V n	        \        P                  ! ^0^4^^^RR7      V n
        \        P                  ! 4       V n        R# )r”   T)ÚpaddingrU   FrT   N)r   r   r   rV   r–   ry   rz   rW   r—   r{   r˜   r|   rZ   s   &€r   r   ÚConv2dPadBias.__init__à   s  ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜˜Q ¨1°4Ô8Ü�GŠG‹IÜ�IŠI�b˜"˜a ¨Ô/Ü�GŠG‹IÜ�IŠI�b˜"˜a ¨A°DÔ9Ü�GŠG‹IÜ�IŠI�b˜"˜a ¨A°DÔ9Ü�GŠG‹IÜ�IŠI�b˜"˜a ¨Ô.Ü�GŠG‹Ió
ˆŒô —y’y  R¨¨A°q¸tÔDˆŒÜ—G’G“IˆŒ	Ü—y’y  R¨¨A°q¸tÔDˆŒÜ—G’G“IˆŽ	r   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   r¶   ó   r   r   c                ó°   € V P                  V4      pV P                  V4      pV P                  V4      pV P                  V4      pV P	                  V4      pV# rb   )rW   r—   r{   r˜   r|   rc   s   &&r   rd   ÚConv2dPadBias.forwardó   r‚   r   )r{   r|   r—   r˜   rW   rg   r1   s   @@r   r´   r´   Ú   s$   ù‡ € ñc÷
ó ÷&÷ ð r   r´   c                   óT   a a€ ] tR t^üt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )Ú
Conv2dPoolzàModel with only Conv2d layers, all with bias, some in a Sequential and some following.
Activation function modules in between each layer, Pool2d modules in between each layer.
Used to test pruned Conv2d-Pool2d-Conv2d fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚConv2dPool.__annotate__  s   ø€ ÷ Nñ N˜$ñ Nr   c                ó   <€ \         SV `  4        \        P                  ! \        P                  ! ^^ ^^RR7      \        P
                  ! ^^^R7      \        P                  ! 4       \        P                  ! ^ ^@^^RR7      \        P                  ! 4       \        P                  ! ^^^R7      4      V n	        \        P                  ! ^@^0^^RR7      V n
        \        P
                  ! ^^^R7      V n        \        P                  ! 4       V n        \        P                  ! ^0^4^^RR7      V n        \        P                  ! ^4^4^^RR7      V n        R# )r”   T©Úkernel_sizer¸   rU   ©rÃ   Ústrider¸   N)r   r   r   rV   r–   Ú	MaxPool2dry   rz   Ú	AvgPool2drW   r—   ÚmaxpoolÚaf1r˜   Úconv2d3rZ   s   &€r   r   ÚConv2dPool.__init__  sã   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜¨°A¸DÔAÜ�LŠL Q¨q¸!Ô<Ü�GŠG‹IÜ�IŠI�b˜"¨!°Q¸TÔBÜ�GŠG‹IÜ�LŠL Q¨q¸!Ô<ó
ˆŒô —y’y  R°QÀÈÔMˆŒÜ—|’|°¸!ÀQÔGˆŒÜ—7’7“9ˆŒÜ—y’y  R°QÀÈÔMˆŒÜ—y’y  R°QÀÈÔMˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   rÀ     ó#   ø€ ÷ 	ñ 	™Ÿ™ð 	©%¯,©,ñ 	r   c                ó2  € V P                  V4      pV P                  V4      pV P                  V4      pV P                  V4      pV P	                  V4      p\
        P                  ! V^^^R7      p\
        P                  ! V4      pV P                  V4      pV# ©r	   rÄ   )	rW   r—   rÈ   rÉ   r˜   rŒ   Ú
avg_pool2dr�   rÊ   rc   s   &&r   rd   ÚConv2dPool.forward  sv   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆØ�L‰L˜‹OˆØ�H‰H�Q‹KˆØ�L‰L˜‹OˆÜ�LŠL˜¨°!¸QÔ?ˆÜ�FŠF�1‹IˆØ�L‰L˜‹OˆØˆr   )rÉ   r—   r˜   rÊ   rÈ   rW   rg   r1   s   @@r   r¾   r¾   ü   s%   ù‡ € ñ8÷Nó N÷ 	÷ 	ð 	r   r¾   c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚConv2dPoolFlattenFunctionali  a  Model with Conv2d layers, all with bias, some in a Sequential and some following, and then a Pool2d
and a functional Flatten followed by a Linear layer.
Activation functions and Pool2ds in between each layer also.
Used to test pruned Conv2d-Pool2d-Flatten-Linear fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   Ú(Conv2dPoolFlattenFunctional.__annotate__#  s   ø€ ÷ /ñ /˜$ñ /r   c                ó–  <€ \         SV `  4        \        P                  ! \        P                  ! ^^^^RR7      \        P
                  ! ^^^R7      \        P                  ! 4       \        P                  ! ^^^^RR7      \        P                  ! 4       \        P                  ! ^^^R7      4      V n	        \        P                  ! ^^^^RR7      V n
        \        P                  ! 4       V n        \        P                  ! ^^^^RR7      V n        \        P                  ! R4      V n        \        P                  ! ^^RR7      V n        R# )r”   TrÂ   rÄ   rT   N)r”   r”   )r   r   r   rV   r–   rÆ   ry   rz   rÇ   rW   r—   rÉ   r˜   ÚAdaptiveAvgPool2dÚavg_poolr6   ÚfcrZ   s   &€r   r   Ú$Conv2dPoolFlattenFunctional.__init__#  sÝ   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜¨°1¸4Ô@Ü�LŠL Q¨q¸!Ô<Ü�GŠG‹IÜ�IŠI�a˜¨°1¸4Ô@Ü�GŠG‹IÜ�LŠL Q¨q¸!Ô<ó
ˆŒô —y’y  A°1¸aÀdÔKˆŒÜ—7’7“9ˆŒÜ—y’y  B°A¸qÀtÔLˆŒÜ×,Ò,¨VÓ4ˆŒÜ—)’)˜B ¨Ô.ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   rÕ   3  rÍ   r   c                ó4  € V P                  V4      pV P                  V4      p\        P                  ! V^^^R7      pV P	                  V4      pV P                  V4      pV P                  V4      p\        P                  ! V^4      pV P                  V4      pV# rÏ   )
rW   r—   rŒ   Ú
max_pool2drÉ   r˜   rØ   rD   ÚflattenrÙ   rc   s   &&r   rd   Ú#Conv2dPoolFlattenFunctional.forward3  sz   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆÜ�LŠL˜¨°!¸QÔ?ˆØ�H‰H�Q‹KˆØ�L‰L˜‹OˆØ�M‰M˜!ÓˆÜ�MŠM˜!˜QÓˆØ�G‰G�A‹JˆØˆr   )rÉ   rØ   r—   r˜   rÙ   rW   rg   r1   s   @@r   rÓ   rÓ     s$   ù‡ € ñ@÷
/ó /÷ 	÷ 	ð 	r   rÓ   c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚConv2dPoolFlatteni?  a
  Model with Conv2d layers, all with bias, some in a Sequential and some following, and then a Pool2d
and a Flatten module followed by a Linear layer.
Activation functions and Pool2ds in between each layer also.
Used to test pruned Conv2d-Pool2d-Flatten-Linear fusion.c                ó   <€ V ^8„  d   QhRR/# rP   r)   )r   r   s   "€r   r   ÚConv2dPoolFlatten.__annotate__E  s   ø€ ÷ /ñ /˜$ñ /r   c                óÊ  <€ \         SV `  4        \        P                  ! \        P                  ! ^^^^RR7      \        P
                  ! ^^^R7      \        P                  ! 4       \        P                  ! ^^^^RR7      \        P                  ! 4       \        P                  ! ^^^R7      4      V n	        \        P                  ! ^^^^RR7      V n
        \        P                  ! 4       V n        \        P                  ! ^^^^RR7      V n        \        P                  ! R4      V n        \        P                  ! 4       V n        \        P"                  ! ^,^RR7      V n        R# )r”   TrÂ   rÄ   rT   N)r	   r	   )r   r   r   rV   r–   rÆ   ry   rz   rÇ   rW   r—   rÉ   r˜   r×   rØ   ÚFlattenrÞ   r6   rÙ   rZ   s   &€r   r   ÚConv2dPoolFlatten.__init__E  sê   ø€ Ü‰ÑÔÜ—=’=Ü�IŠI�a˜¨°1¸4Ô@Ü�LŠL Q¨q¸!Ô<Ü�GŠG‹IÜ�IŠI�a˜¨°1¸4Ô@Ü�GŠG‹IÜ�LŠL Q¨q¸!Ô<ó
ˆŒô —y’y  A°1¸aÀdÔKˆŒÜ—7’7“9ˆŒÜ—y’y  B°A¸qÀtÔLˆŒÜ×,Ò,¨VÓ4ˆŒÜ—z’z“|ˆŒÜ—)’)˜B ¨Ô.ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r]   r_   )r   r   s   "€r   r   rã   V  rÍ   r   c                ó(  € V P                  V4      pV P                  V4      p\        P                  ! V^^^R7      pV P	                  V4      pV P                  V4      pV P                  V4      pV P                  V4      pV P                  V4      pV# rÏ   )	rW   r—   rŒ   rÝ   rÉ   r˜   rØ   rÞ   rÙ   rc   s   &&r   rd   ÚConv2dPoolFlatten.forwardV  sw   € Ø�H‰H�Q‹KˆØ�L‰L˜‹OˆÜ�LŠL˜¨°!¸QÔ?ˆØ�H‰H�Q‹KˆØ�L‰L˜‹OˆØ�M‰M˜!ÓˆØ�L‰L˜‹OˆØ�G‰G�A‹JˆØˆr   )rÉ   rØ   r—   r˜   rÙ   rÞ   rW   rg   r1   s   @@r   rá   rá   ?  s$   ù‡ € ñ@÷
/ó /÷"	÷ 	ð 	r   rá   c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚLSTMLinearModelib  zCContainer module with an encoder, a recurrent module, and a linear.c          
      ó6   <€ V ^8„  d   QhRS[ RS[ RS[ RS[ RR/# ©r	   Ú	input_dimÚ
hidden_dimÚ
output_dimÚ
num_layersr   N©Úint)r   r   s   "€r   r   ÚLSTMLinearModel.__annotate__e  s5   ø€ ÷ 8ñ 8Ùð8Ù*-ð8Ù;>ð8ÙLOð8à	ñ8r   c                ó’   <€ \         SV `  4        \        P                  ! WV4      V n        \        P
                  ! W#4      V n        R # rb   )r   r   r   ÚLSTMÚlstmr6   r<   ©r   rî   rï   rð   rñ   r   s   &&&&&€r   r   ÚLSTMLinearModel.__init__e  s2   ø€ ô 	‰ÑÔÜ—G’G˜I°:Ó>ˆŒ	Ü—i’i 
Ó7ˆŽr   c                óx   <€ V ^8„  d   QhRS[ P                  RS[S[ P                  S[ P                  3,          /# )r	   Úinputr   ©rD   rE   Útuple)r   r   s   "€r   r   rô   l  s1   ø€ ÷ ñ ™UŸ\™\ð ©e±E·L±LÁ%Ç,Á,Ð4NÕ.Oñ r   c                óP   € V P                  V4      w  r#V P                  V4      pWB3# rb   )r÷   r<   )r   rû   ÚoutputÚ_hiddenÚdecodeds   &&   r   rd   ÚLSTMLinearModel.forwardl  s(   € ØŸ)™) EÓ*‰ˆØ—+‘+˜fÓ%ˆØˆÐr   )r<   r÷   rg   r1   s   @@r   rë   rë   b  s!   ù‡ € ÙM÷8ó 8÷÷ ð r   rë   c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚLSTMLayerNormLinearModelir  z9Container module with an LSTM, a LayerNorm, and a linear.c          
      ó6   <€ V ^8„  d   QhRS[ RS[ RS[ RS[ RR/# rí   rò   )r   r   s   "€r   r   Ú%LSTMLayerNormLinearModel.__annotate__u  s5   ø€ ÷ 8ñ 8Ùð8Ù*-ð8Ù;>ð8ÙLOð8à	ñ8r   c                óÈ   <€ \         SV `  4        \        P                  ! WV4      V n        \        P
                  ! V4      V n        \        P                  ! W#4      V n        R # rb   )	r   r   r   rö   r÷   Ú	LayerNormÚnormr6   r<   rø   s   &&&&&€r   r   Ú!LSTMLayerNormLinearModel.__init__u  sB   ø€ ô 	‰ÑÔÜ—G’G˜I°:Ó>ˆŒ	Ü—L’L Ó,ˆŒ	Ü—i’i 
Ó7ˆŽr   c                óx   <€ V ^8„  d   QhRS[ P                  RS[S[ P                  S[ P                  3,          /# r]   rü   )r   r   s   "€r   r   r  }  s1   ø€ ÷ ñ ™Ÿ™ð ©%±·±¹e¿l¹lÐ0JÕ*Kñ r   c                ór   € V P                  V4      w  rV P                  V4      pV P                  V4      pW3# rb   )r÷   r	  r<   )r   r^   r$   s   && r   rd   Ú LSTMLayerNormLinearModel.forward}  s2   € Ø—9‘9˜Q“<‰ˆØ�I‰I�a‹LˆØ�K‰K˜‹NˆØˆxˆr   )r<   r÷   r	  rg   r1   s   @@r   r  r  r  s!   ù‡ € ÙC÷8ó 8÷÷ ð r   r  )Útypingr   Útorch.ao.pruningr   rD   Útorch.nn.functionalr   Ú
functionalrŒ   r   r6   r3   rL   r   rN   ri   rt   r„   r�   r    rª   r´   r¾   rÓ   rá   rë   r  r)   r   r   Ú<module>r     s  ðõ Ý +Û ß Ð Ý ôK˜Nô Kô�r—y‘yô õô �2—9‘9ô ô*�—‘ô ô&�r—y‘yô ô8 §¡ô ô>�2—9‘9ô ô(�—‘ô ô*�r—y‘yô ô8�B—I‘Iô ôD�—‘ô ôB "§)¡)ô ôD ˜Ÿ	™	ô  ôF�b—i‘iô ô ˜rŸy™yö r   