+
    œ°³j¬O  ã                   ó€  € R t ^ RIt^ RIt^ RIHt ^RIHt ^RIHt ^RI	H
t
HtHt ^RIHt ^RIHtHt ^RIHt ]P(                  ! ]4      tR	 R
 ltR%R R llt ! R R]P2                  4      t ! R R]P6                  4      t ! R R]P2                  4      t ! R R]P2                  4      t ! R R]P2                  4      t ! R R]P2                  4      t  ! R R]P2                  4      t! ! R R]P2                  4      t"] ! R R]4      4       t#] ! R R ]#4      4       t$]! R!R"7       ! R# R$]#4      4       t%. R&Ot&R# )'zPyTorch EfficientNet model.N)Únn)Úinitialization)ÚACT2FN)ÚBaseModelOutputWithNoAttentionÚ(BaseModelOutputWithPoolingAndNoAttentionÚ$ImageClassifierOutputWithNoAttention)ÚPreTrainedModel)Úauto_docstringÚlogging©ÚEfficientNetConfigc                ó0   € V ^8„  d   QhR\         R\        /# )é   ÚconfigÚnum_channels©r   Úint)Úformats   "Úw/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/efficientnet/modeling_efficientnet.pyÚ__annotate__r   $   s   € ÷ ñ Ô,ð ¼Cñ ó    c                óà   € V P                   pWP                  ,          p\        V\        W^,          ,           4      V,          V,          4      pVRV,          8  d	   W2,          p\        V4      # )z4
Round number of filters based on depth multiplier.
gÍÌÌÌÌÌì?)Údepth_divisorÚwidth_coefficientÚmaxr   )r   r   ÚdivisorÚnew_dims   &&  r   Úround_filtersr   $   s`   € ð ×"Ñ"€GØ×,Ñ,Õ,€LÜ�'œ3˜|¸­kÕ9Ó:¸gÕEÈÕOÓP€Gð ��|Õ#Ô#ØÕˆäˆw‹<Ðr   c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   Úkernel_sizeÚadjust)r   ÚtupleÚbool)r   s   "r   r   r   3   s"   € ÷ @ñ @œS¤5�[ð @´$ñ @r   c                ó(  € \        V \        4      '       d   W 3p V ^ ,          ^,          V ^,          ^,          3pV'       d1   V^,          ^,
          V^,          V^ ,          ^,
          V^ ,          3# V^,          V^,          V^ ,          V^ ,          3# )a.  
Utility function to get the tuple padding value for the depthwise convolution.

Args:
    kernel_size (`int` or `tuple`):
        Kernel size of the convolution layers.
    adjust (`bool`, *optional*, defaults to `True`):
        Adjusts padding value to apply to right and bottom sides of the input.
)Ú
isinstancer   )r   r    Úcorrects   && r   Úcorrect_padr&   3   s~   € ô �+œs×#Ò#Ø"Ð0ˆà˜1�~ Õ" K°¥N°aÕ$7Ð8€GßØ˜•
˜Q• ¨¥
¨G°A­J¸­N¸GÀA½JÐGÐGà˜•
˜G A�J¨°­
°G¸AµJÐ?Ð?r   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	# )ÚEfficientNetEmbeddingszD
A module that corresponds to the stem module of the original work.
c                ó    <€ V ^8„  d   QhRS[ /# ©r   r   r   )r   Ú__classdict__s   "€r   r   Ú#EfficientNetEmbeddings.__annotate__L   s   ø€ ÷ 	4ñ 	4Ñ1ñ 	4r   c           	     ó˜  <€ \         SV `  4        \        V^ 4      V n        \        P
                  ! RR7      V n        \        P                  ! VP                  V P                  ^^RRR7      V n	        \        P                  ! V P                  VP                  VP                  R7      V n        \        VP                  ,          V n        R# )é    ©ÚpaddingÚvalidF©r   Ústrider0   Úbias)ÚepsÚmomentumN)é    é   r7   r8   )ÚsuperÚ__init__r   Úout_dimr   Ú	ZeroPad2dr0   ÚConv2dr   ÚconvolutionÚBatchNorm2dÚbatch_norm_epsÚbatch_norm_momentumÚ	batchnormr   Ú
hidden_actÚ
activation©Úselfr   Ú	__class__s   &&€r   r:   ÚEfficientNetEmbeddings.__init__L   s�   ø€ Ü‰ÑÔä$ V¨RÓ0ˆŒÜ—|’|¨LÔ9ˆŒÜŸ9š9Ø×Ñ §¡¸1ÀQÐPWÐ^cô
ˆÔô Ÿš¨¯©¸&×:OÑ:OÐZ`×ZtÑZtÔuˆŒÜ  ×!2Ñ!2Õ3ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# )r   Úpixel_valuesÚreturn)ÚtorchÚTensor)r   r+   s   "€r   r   r,   W   s#   ø€ ÷ ñ ¡E§L¡Lð ±U·\±\ñ r   c                óŽ   € V P                  V4      pV P                  V4      pV P                  V4      pV P                  V4      pV# ©N)r0   r>   rB   rD   )rF   rJ   Úfeaturess   && r   ÚforwardÚEfficientNetEmbeddings.forwardW   sA   € Ø—<‘< Ó-ˆØ×#Ñ# HÓ-ˆØ—>‘> (Ó+ˆØ—?‘? 8Ó,ˆàˆr   )rD   rB   r>   r;   r0   ©
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r:   rQ   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©rG   r+   s   @@r   r(   r(   G   s#   ù‡ € ñ÷	4ó 	4÷÷ ð r   r(   c                   ó6   a a€ ] tR t^`t oRV 3R lltRtVtV ;t# )ÚEfficientNetDepthwiseConv2dc	                óH   <€ W,          p	\         S
V `  VV	VVVVVVVR 7	       R# ))	Úin_channelsÚout_channelsr   r3   r0   ÚdilationÚgroupsr4   Úpadding_modeN)r9   r:   )rF   r`   Údepth_multiplierr   r3   r0   rb   r4   rd   ra   rG   s   &&&&&&&&& €r   r:   Ú$EfficientNetDepthwiseConv2d.__init__a   s:   ø€ ð #Õ5ˆÜ‰ÑØ#Ø%Ø#ØØØØØØ%ð 	ö 
	
r   © )r8   é   r8   r7   r8   TÚzeros)rT   rU   rV   rW   r:   rY   rZ   r[   r\   s   @@r   r^   r^   `   s   ù‡ € ÷
÷ 
r   r^   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	# )ÚEfficientNetExpansionLayerzW
This corresponds to the expansion phase of each block in the original implementation.
c                ó2   <€ V ^8„  d   QhRS[ RS[RS[RS[/# )r   r   Úin_dimr;   r3   r   )r   r+   s   "€r   r   Ú'EfficientNetExpansionLayer.__annotate__   s+   ø€ ÷ 
4ñ 
4Ñ1ð 
4¹3ð 
4Éð 
4ÑVYñ 
4r   c                óè   <€ \         SV `  4        \        P                  ! VV^RRR7      V n        \        P
                  ! W1P                  R7      V n        \        VP                  ,          V n
        R# )r8   ÚsameF©r`   ra   r   r0   r4   )Únum_featuresr5   N)r9   r:   r   r=   Úexpand_convr?   r@   Ú	expand_bnr   rC   Ú
expand_act)rF   r   rm   r;   r3   rG   s   &&&&&€r   r:   Ú#EfficientNetExpansionLayer.__init__   sX   ø€ Ü‰ÑÔÜŸ9š9ØØ ØØØô
ˆÔô Ÿš°W×BWÑBWÔXˆŒÜ  ×!2Ñ!2Õ3ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# ©r   Úhidden_statesrK   ©rL   ÚFloatTensorrM   )r   r+   s   "€r   r   rn   ‹   s%   ø€ ÷ ñ ¡U×%6Ñ%6ð ¹5¿<¹<ñ r   c                ól   € V P                  V4      pV P                  V4      pV P                  V4      pV# rO   )rs   rt   ru   ©rF   ry   s   &&r   rQ   Ú"EfficientNetExpansionLayer.forward‹   s4   € à×(Ñ(¨Ó7ˆØŸ™ }Ó5ˆØŸ™¨Ó6ˆàÐr   )ru   rt   rs   rS   r\   s   @@r   rk   rk   z   s#   ù‡ € ñ÷
4ó 
4÷÷ ð r   rk   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	# )ÚEfficientNetDepthwiseLayerzc
This corresponds to the depthwise convolution phase of each block in the original implementation.
c          
      ó8   <€ V ^8„  d   QhRS[ RS[RS[RS[RS[/# )r   r   rm   r3   r   Úadjust_padding©r   r   r"   )r   r+   s   "€r   r   Ú'EfficientNetDepthwiseLayer.__annotate__™   s=   ø€ ÷ 7ñ 7á"ð7ñ ð7ñ ð	7ñ
 ð7ñ ñ7r   c                ój  <€ \         SV `  4        W0n        V P                  ^8X  d   RMRp\        WER7      p\        P
                  ! VR7      V n        \        W$W6RR7      V n        \        P                  ! W!P                  VP                  R7      V n        \        VP                  ,          V n        R# )	r   r1   rp   )r    r/   Fr2   ©rr   r5   r6   N)r9   r:   r3   r&   r   r<   Údepthwise_conv_padr^   Údepthwise_convr?   r@   rA   Údepthwise_normr   rC   Údepthwise_act)	rF   r   rm   r3   r   r‚   Úconv_padr0   rG   s	   &&&&&&  €r   r:   Ú#EfficientNetDepthwiseLayer.__init__™   s�   ø€ ô 	‰ÑÔØŒØ"Ÿk™k¨QÔ.‘7°FˆÜ˜kÔAˆä"$§,¢,°wÔ"?ˆÔÜ9Ø°FÐSXô
ˆÔô !ŸnšnØ×%:Ñ%:ÀV×E_ÑE_ô
ˆÔô $ F×$5Ñ$5Õ6ˆÖr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rx   rz   )r   r+   s   "€r   r   r„   ¯   s%   ø€ ÷ 	ñ 	¡U×%6Ñ%6ð 	¹5¿<¹<ñ 	r   c                ó°   € V P                   ^8X  d   V P                  V4      pV P                  V4      pV P                  V4      pV P	                  V4      pV# )r   )r3   r‡   rˆ   r‰   rŠ   r}   s   &&r   rQ   Ú"EfficientNetDepthwiseLayer.forward¯   sT   € à�;‰;˜!ÔØ ×3Ñ3°MÓBˆMà×+Ñ+¨MÓ:ˆØ×+Ñ+¨MÓ:ˆØ×*Ñ*¨=Ó9ˆàÐr   )rŠ   rˆ   r‡   r‰   r3   rS   r\   s   @@r   r€   r€   ”   s#   ù‡ € ñ÷7ó 7÷,	÷ 	ð 	r   r€   c                   óX   a a€ ] tR t^»t oRtRV3R lV 3R llltV3R lR ltRtVtV ;t	# )ÚEfficientNetSqueezeExciteLayerzd
This corresponds to the Squeeze and Excitement phase of each block in the original implementation.
c                ó2   <€ V ^8„  d   QhRS[ RS[RS[RS[/# )r   r   rm   Ú
expand_dimÚexpandrƒ   )r   r+   s   "€r   r   Ú+EfficientNetSqueezeExciteLayer.__annotate__À   s+   ø€ ÷ 'ñ 'Ñ1ð '¹3ð 'ÉCð 'ÑY]ñ 'r   c                ó
  <€ \         SV `  4        V'       d   TMTV n        \        ^\	        W!P
                  ,          4      4      V n        \        P                  ! ^R7      V n	        \        P                  ! V P                  V P                  ^RR7      V n        \        P                  ! V P                  V P                  ^RR7      V n        \        VP                  ,          V n        \        P                   ! 4       V n        R# )r8   )Úoutput_sizerp   )r`   ra   r   r0   N)r9   r:   Údimr   r   Úsqueeze_expansion_ratioÚdim_ser   ÚAdaptiveAvgPool2dÚsqueezer=   Úreducer”   r   rC   Ú
act_reduceÚSigmoidÚ
act_expand)rF   r   rm   r“   r”   rG   s   &&&&&€r   r:   Ú'EfficientNetSqueezeExciteLayer.__init__À   s²   ø€ Ü‰ÑÔß!'‘:¨VˆŒÜ˜!œS ×*HÑ*HÕ!HÓIÓJˆŒä×+Ò+¸Ô:ˆŒÜ—i’iØŸ™ØŸ™ØØô	
ˆŒô —i’iØŸ™ØŸ™ØØô	
ˆŒô ! ×!2Ñ!2Õ3ˆŒÜŸ*š*›,ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rx   rz   )r   r+   s   "€r   r   r•   Õ   ó%   ø€ ÷ 
ñ 
¡U×%6Ñ%6ð 
¹5¿<¹<ñ 
r   c                óà   € T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\
        P                  ! W!4      pV# rO   )rœ   r�   rž   r”   r    rL   Úmul)rF   ry   Úinputss   && r   rQ   Ú&EfficientNetSqueezeExciteLayer.forwardÕ   sa   € ØˆØŸ™ ]Ó3ˆØŸ™ MÓ2ˆØŸ™¨Ó6ˆàŸ™ MÓ2ˆØŸ™¨Ó6ˆÜŸ	š	 &Ó8ˆàÐr   )r    rž   r˜   rš   r”   r�   rœ   )FrS   r\   s   @@r   r‘   r‘   »   s#   ù‡ € ñ÷'õ '÷*
÷ 
ð 
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	# )ÚEfficientNetFinalBlockLayerzS
This corresponds to the final phase of each block in the original implementation.
c                ó>   <€ V ^8„  d   QhRS[ RS[RS[RS[RS[RS[/# )r   r   rm   r;   r3   Ú	drop_rateÚid_skip©r   r   Úfloatr"   )r   r+   s   "€r   r   Ú(EfficientNetFinalBlockLayer.__annotate__ç   s=   ø€ ÷ /ñ /Ù(ð/Ù25ð/Ù@Cð/ÙMPð/Ù]bð/Ùmqñ/r   c                ó0  <€ \         SV `  4        V^8H  ;'       d    V'       * V n        \        P                  ! VV^RRR7      V n        \        P                  ! W1P                  VP                  R7      V n	        \        P                  ! VR7      V n        R# )r8   rp   Frq   r†   ©ÚpN)r9   r:   Úapply_dropoutr   r=   Úproject_convr?   r@   rA   Ú
project_bnÚDropoutÚdropout)rF   r   rm   r;   r3   r«   r¬   rG   s   &&&&&&&€r   r:   Ú$EfficientNetFinalBlockLayer.__init__ç   s{   ø€ ô 	‰ÑÔØ# q™[×8Ð8°¬[ˆÔÜŸIšIØØ ØØØô
ˆÔô Ÿ.š.Ø ×&;Ñ&;Àf×F`ÑF`ô
ˆŒô —z’z IÔ.ˆŽr   c                óh   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[ P                  /# )r   Ú
embeddingsry   rK   rz   )r   r+   s   "€r   r   r¯   ø   s5   ø€ ÷ ñ ¡%×"3Ñ"3ð ÁE×DUÑDUð ÑZ_×ZfÑZfñ r   c                ó    € V P                  V4      pV P                  V4      pV P                  '       d   V P                  V4      pW!,           pV# rO   )r´   rµ   r³   r·   )rF   rº   ry   s   &&&r   rQ   Ú#EfficientNetFinalBlockLayer.forwardø   sH   € Ø×)Ñ)¨-Ó8ˆØŸ™¨Ó6ˆà××ÐØ ŸL™L¨Ó7ˆMØ)Õ6ˆMàÐr   )r³   r·   rµ   r´   rS   r\   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	# )ÚEfficientNetBlocki  aA  
This corresponds to the expansion and depthwise convolution phase of each block in the original implementation.

Args:
    config ([`EfficientNetConfig`]):
        Model configuration class.
    in_dim (`int`):
        Number of input channels.
    out_dim (`int`):
        Number of output channels.
    stride (`int`):
        Stride size to be used in convolution layers.
    expand_ratio (`int`):
        Expand ratio to set the output dimensions for the expansion and squeeze-excite layers.
    kernel_size (`int`):
        Kernel size for the depthwise convolution layer.
    drop_rate (`float`):
        Dropout rate to be used in the final phase of each block.
    id_skip (`bool`):
        Whether to apply dropout and sum the final hidden states with the input embeddings during the final phase
        of each block. Set to `True` for the first block of each stage.
    adjust_padding (`bool`):
        Whether to apply padding to only right and bottom side of the input kernel before the depthwise convolution
        operation, set to `True` for inputs with odd input sizes.
c                óP   <€ V ^8„  d   QhRS[ RS[RS[RS[RS[RS[RS[RS[R	S[/	# )
r   r   rm   r;   r3   Úexpand_ratior   r«   r¬   r‚   r­   )r   r+   s   "€r   r   ÚEfficientNetBlock.__annotate__  se   ø€ ÷ '
ñ '
á"ð'
ñ ð'
ñ ð	'
ñ
 ð'
ñ ð'
ñ ð'
ñ ð'
ñ ð'
ñ ñ'
r   c
           	     óŽ  <€ \         SV `  4        WPn        V P                  ^8g  V n        W%,          p
V P                  '       d   \	        WW¤R7      V n        \        TV P                  '       d   T
MTVVV	R7      V n        \        WW P                  R7      V n	        \        TV P                  '       d   T
MTVVVVR7      V n        R# )r8   )r   rm   r;   r3   )r   rm   r3   r   r‚   )r   rm   r“   r”   )r   rm   r;   r3   r«   r¬   N)r9   r:   rÀ   r”   rk   Ú	expansionr€   rˆ   r‘   Úsqueeze_exciter©   Ú
projection)rF   r   rm   r;   r3   rÀ   r   r«   r¬   r‚   Úexpand_in_dimrG   s   &&&&&&&&&& €r   r:   ÚEfficientNetBlock.__init__  s´   ø€ ô 	‰ÑÔØ(ÔØ×'Ñ'¨1Ñ,ˆŒØÕ-ˆà�;�;ˆ;Ü7Ø°môˆDŒNô 9ØØ$(§K§K K‘=°VØØ#Ø)ô
ˆÔô =Ø°]Ï;É;ô
ˆÔô 6ØØ$(§K§K K‘=°VØØØØô
ˆŽr   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rx   rz   )r   r+   s   "€r   r   rÁ   G  r£   r   c                ó´   € TpV P                   ^8w  d   V P                  V4      pV P                  V4      pV P                  V4      pV P	                  W!4      pV# )r8   )rÀ   rÃ   rˆ   rÄ   rÅ   )rF   ry   rº   s   && r   rQ   ÚEfficientNetBlock.forwardG  sY   € Ø"ˆ
à×Ñ Ô!Ø ŸN™N¨=Ó9ˆMØ×+Ñ+¨MÓ:ˆð ×+Ñ+¨MÓ:ˆØŸ™¨
ÓBˆØÐr   )rˆ   r”   rÀ   rÃ   rÅ   rÄ   rS   r\   s   @@r   r¾   r¾     s$   ù‡ € ñ÷4'
ó '
÷R
÷ 
ð 
r   r¾   c                   óX   a a€ ] tR tRt oRtV3R lV 3R lltRV3R lR lltRtVtV ;t	# )	ÚEfficientNetEncoderiT  z“
Forward propagates the embeddings through each EfficientNet block.

Args:
    config ([`EfficientNetConfig`]):
        Model configuration class.
c                ó    <€ V ^8„  d   QhRS[ /# r*   r   )r   r+   s   "€r   r   Ú EfficientNetEncoder.__annotate__]  s   ø€ ÷ 58ñ 58Ñ1ñ 58r   c                óL  <a a€ \         SS `  4        VS n        VP                  S n        V 3R  lo\	        VP
                  4      p\        V3R lVP                   4       4      p^ p. p\        V4       EF  p\        WP
                  V,          4      p\        WP                  V,          4      pVP                  V,          p	VP                  V,          p
VP                  V,          p\        S! VP                  V,          4      4       Ft  pV^ 8H  pV^ 8”  d   ^MT	p	V^ 8”  d   TMTpWAP                  9  pVP                  V,          V,          p\!        VVVV	V
VVVVR7	      pVP#                  V4       V^,          pKv  	  EK  	  \$        P&                  ! V4      S n        \$        P*                  ! X\        VR4      ^RRR7      S n        \$        P.                  ! VP0                  VP2                  VP4                  R7      S n        \8        VP:                  ,          S n        R# )	c                 ód   <€ \        \        P                  ! SP                  V ,          4      4      # rO   )r   ÚmathÚceilÚdepth_coefficient)ÚrepeatsrF   s   &€r   Úround_repeatsÚ3EfficientNetEncoder.__init__.<locals>.round_repeatsb  s"   ø€ ä”t—y’y ×!7Ñ!7¸'Õ!AÓBÓCÐCr   c              3   ó4   <"  € T F  pS! V4      x € K  	  R # 5irO   rg   )Ú.0ÚnrÕ   s   & €r   Ú	<genexpr>Ú/EfficientNetEncoder.__init__.<locals>.<genexpr>g  s   øé € ÐLÑ3K¨a™ q×)Ð)Ó3Kùs   ƒ)	r   rm   r;   r3   r   rÀ   r«   r¬   r‚   i   rp   Frq   r†   N)r9   r:   r   rÓ   Úlenr`   ÚsumÚnum_block_repeatsÚranger   ra   ÚstridesÚkernel_sizesÚexpand_ratiosÚdepthwise_paddingÚdrop_connect_rater¾   Úappendr   Ú
ModuleListÚblocksr=   Útop_convr?   Ú
hidden_dimr@   rA   Útop_bnr   rC   Útop_activation)rF   r   Únum_base_blocksÚ
num_blocksÚcurr_block_numrç   Úirm   r;   r3   r   rÀ   Újr¬   r‚   r«   ÚblockrÕ   rG   s   f&               @€r   r:   ÚEfficientNetEncoder.__init__]  sÞ  ú€ Ü‰ÑÔØˆŒØ!'×!9Ñ!9ˆÔõ	Dô ˜f×0Ñ0Ó1ˆÜÔL°6×3KÒ3KÓLÓLˆ
àˆØˆÜ�×'ˆAÜ" 6×+=Ñ+=¸aÕ+@ÓAˆFÜ# F×,?Ñ,?ÀÕ,BÓCˆGØ—^‘^ AÕ&ˆFØ ×-Ñ-¨aÕ0ˆKØ!×/Ñ/°Õ2ˆLä™=¨×)AÑ)AÀ!Õ)DÓEÖF�Ø˜q™&�Ø !œe™¨�Ø$%¨¤E™¨v�Ø!/×7OÑ7OÑ!O�Ø"×4Ñ4°~ÕEÈ
ÕR�	ä)Ø!Ø!Ø#Ø!Ø +Ø!-Ø'Ø#Ø#1ô
�ð —‘˜eÔ$Ø !Õ#’ô' Gñ (ô8 —m’m FÓ+ˆŒÜŸ	š	ØÜ& v¨tÓ4ØØØô
ˆŒô —n’nØ×*Ñ*°×0EÑ0EÐPV×PjÑPjô
ˆŒô % V×%6Ñ%6Õ7ˆÖr   c                ób   <€ V ^8„  d   QhRS[ P                  RS[R,          RS[R,          RS[/# )r   ry   Úoutput_hidden_statesNÚreturn_dictrK   )rL   r{   r"   r   )r   r+   s   "€r   r   rÎ   ”  sA   ø€ ÷ 
ñ 
á×(Ñ(ð
ñ # T�kð
ñ ˜D•[ð	
ñ
 
(ñ
r   c                ód  € V'       d   V3MR pV P                    F  pV! V4      pV'       g   K  WA3,          pK   	  V P                  V4      pV P                  V4      pV P                  V4      pV'       g/   \        ;QJ d    . R W3 4       F  NK  	  5# ! R W3 4       4      # \        VVR7      # )Nc              3   ó0   "  € T F  qf   K  Vx € K  	  R # 5irO   rg   )rØ   Úvs   & r   rÚ   Ú.EfficientNetEncoder.forward.<locals>.<genexpr>¦  s   é € ÐXÑ$F˜qŸšÓ$Fùs   ‚Œ
)Úlast_hidden_statery   )rç   rè   rê   rë   r!   r   )rF   ry   rô   rõ   Úall_hidden_statesrñ   s   &&&&  r   rQ   ÚEfficientNetEncoder.forward”  s¨   € ÷ 1E˜]Ñ,È$Ðà—[”[ˆEÙ! -Ó0ˆMß#Ñ#Ø!Ð%5Õ5Ò!ñ !ð
 Ÿ™ mÓ4ˆØŸ™ MÓ2ˆØ×+Ñ+¨MÓ:ˆçß”5ÑX ]Ñ$FÓX—5ÐX�5ÑX ]Ñ$FÓXÓXÐXä-Ø+Ø+ô
ð 	
r   )rç   r   rÓ   rë   rê   rè   )FTrS   r\   s   @@r   rÌ   rÌ   T  s$   ù‡ € ñ÷58ó 58÷n
÷ 
ò 
r   rÌ   c                   ó„   a a€ ] tR tRt oRtRtR	tR.t]P                  ! 4       V3R lV 3R ll4       t
V3R ltRtVtV ;t# )
ÚEfficientNetPreTrainedModeli®  ÚefficientnetrJ   r¾   c                ó4   <€ V ^8„  d   QhRS[ P                  /# )r   Úmodule)r   ÚModule)r   r+   s   "€r   r   Ú(EfficientNetPreTrainedModel.__annotate__·  s   ø€ ÷ 
8ñ 
8¡B§I¡Iñ 
8r   c                óT  <€ \         SV `  V4       \        V\        P                  \        P
                  \        P                  34      '       dÙ   \        P                  ! VP                  RV P                  P                  R7       VP                  e!   \        P                  ! VP                  4       \        VRR4      ec   \        P                  ! VP                  4       \        P                   ! VP"                  4       \        P                  ! VP$                  4       R# R# R# )zInitialize the weightsg        )ÚmeanÚstdNÚrunning_mean)r9   Ú_init_weightsr$   r   ÚLinearr=   r?   ÚinitÚnormal_Úweightr   Úinitializer_ranger4   Úzeros_Úgetattrr  Úones_Úrunning_varÚnum_batches_tracked)rF   r  rG   s   &&€r   r  Ú)EfficientNetPreTrainedModel._init_weights¶  s»   ø€ ô 	‰Ñ˜fÔ%Ü�fœrŸy™y¬"¯)©)´R·^±^ÐD×EÒEÜ�LŠL˜Ÿ™¨S°d·k±k×6SÑ6SÕTØ�{‰{Ò&Ü—’˜FŸK™KÔ(Ü�v˜~¨tÓ4Ò@Ü—’˜F×/Ñ/Ô0Ü—
’
˜6×-Ñ-Ô.Ü—’˜F×6Ñ6Ö7ñ Añ	 Fr   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # r*   r   )r   r+   s   "€r   r   r  ®  s   ø‡ ‚ áÑò r   rg   )Úimage)rT   rU   rV   rW   Úbase_model_prefixÚmain_input_nameÚinput_modalitiesÚ_no_split_modulesrL   Úno_gradr  Ú__annotate_func__rY   rZ   r[   r\   s   @@r   rþ   rþ   ®  sE   ù‡ € ð 'ÐØ$€OØ!ÐØ,Ð-Ðà
‡]‚]ƒ_÷
8ò 
8ó ð
8÷ … r   rþ   c                   ó^   a a€ ] tR tRt oV3R lV 3R llt]RV3R lR ll4       tRtVtV ;t	# )ÚEfficientNetModeliÄ  c                ó    <€ V ^8„  d   QhRS[ /# r*   r   )r   r+   s   "€r   r   ÚEfficientNetModel.__annotate__Æ  s   ø€ ÷ ñ Ñ1ñ r   c                ó¦  <€ \         SV `  V4       Wn        \        V4      V n        \        V4      V n        VP                  R 8X  d)   \        P                  ! VP                  RR7      V n        MQVP                  R8X  d)   \        P                  ! VP                  RR7      V n        M\        RVP                   24      hV P                  4        R# )r  T)Ú	ceil_moder   z2config.pooling must be one of ['mean', 'max'] got N)r9   r:   r   r(   rº   rÌ   ÚencoderÚpooling_typer   Ú	AvgPool2dré   ÚpoolerÚ	MaxPool2dÚ
ValueErrorÚpoolingÚ	post_initrE   s   &&€r   r:   ÚEfficientNetModel.__init__Æ  s¢   ø€ Ü‰Ñ˜Ô ØŒÜ0°Ó8ˆŒÜ*¨6Ó2ˆŒð ×Ñ &Ô(ÜŸ,š, v×'8Ñ'8ÀDÔIˆD�KØ× Ñ  EÔ)ÜŸ,š, v×'8Ñ'8ÀDÔIˆD�KäÐQÐRX×R`ÑR`ÐQaÐbÓcÐcð 	�‰Ör   c          	      ó€   <€ V ^8„  d   QhRS[ P                  R,          RS[R,          RS[R,          RS[S[,          /# )r   rJ   Nrô   rõ   rK   )rL   r{   r"   r!   r   )r   r+   s   "€r   r   r  Ø  sL   ø€ ÷ #
ñ #
á×'Ñ'¨$Õ.ð#
ñ # T�kð#
ñ ˜D•[ð	#
ñ 
Ñ9Õ	9ñ#
r   c                ó´  € Ve   TMV P                   P                  pVe   TMV P                   P                  pVf   \        R4      hV P	                  V4      pV P                  VVVR7      pV^ ,          pV P                  V4      pVP                  VP                  R,          4      pV'       g   Wx3VR,          ,           # \        VVVP                  R7      # )Nz You have to specify pixel_values©rô   rõ   :Nr   N:r8   NN)rú   Úpooler_outputry   )r   rô   rõ   r'  rº   r"  r%  ÚreshapeÚshaper   ry   )	rF   rJ   rô   rõ   ÚkwargsÚembedding_outputÚencoder_outputsrú   Úpooled_outputs	   &&&&,    r   rQ   ÚEfficientNetModel.forward×  sÜ   € ð %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆàÒÜÐ?Ó@Ð@àŸ?™?¨<Ó8ÐàŸ,™,ØØ!5Ø#ð 'ó 
ˆð ,¨AÕ.ÐØŸ™Ð$5Ó6ˆà%×-Ñ-¨m×.AÑ.AÀ"Õ.EÓFˆçØ%Ð5¸ÈÕ8KÕKÐKä7Ø/Ø'Ø)×7Ñ7ô
ð 	
r   )r   rº   r"  r%  )NNN©
rT   rU   rV   rW   r:   r	   rQ   rY   rZ   r[   r\   s   @@r   r  r  Ä  s-   ù‡ € ÷ó ð" ÷#
ñ #
ó ÷#
ð #
r   r  zŒ
    EfficientNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g.
    for ImageNet.
    )Úcustom_introc                   óR   a a€ ] tR tRt oV 3R lt]RV3R lR ll4       tRtVtV ;t	# )Ú"EfficientNetForImageClassificationiþ  c                óŒ  <€ \         SV `  V4       VP                  V n        Wn        \	        V4      V n        \        P                  ! VP                  R 7      V n	        V P                  ^ 8”  d,   \        P                  ! VP                  V P                  4      M\        P                  ! 4       V n        V P                  4        R# )r±   N)r9   r:   Ú
num_labelsr   r  rÿ   r   r¶   Údropout_rater·   r	  ré   ÚIdentityÚ
classifierr)  rE   s   &&€r   r:   Ú+EfficientNetForImageClassification.__init__  s…   ø€ Ü‰Ñ˜Ô Ø ×+Ñ+ˆŒØŒÜ-¨fÓ5ˆÔä—z’z F×$7Ñ$7Ô8ˆŒØKOÏ?É?Ð]^ÔK^œ"Ÿ)š) F×$5Ñ$5°t·±ÔGÔdf×doÒdoÓdqˆŒð 	�‰Ör   c                ó¨   <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[R,          RS[R,          RS[S[,          /# )r   rJ   NÚlabelsrô   rõ   rK   )rL   r{   Ú
LongTensorr"   r!   r   )r   r+   s   "€r   r   Ú/EfficientNetForImageClassification.__annotate__  sa   ø€ ÷ "
ñ "
á×'Ñ'¨$Õ.ð"
ñ × Ñ  4Õ'ð"
ñ # T�kð	"
ñ
 ˜D•[ð"
ñ 
Ñ5Õ	5ñ"
r   c                ó¤  € Ve   TMV P                   P                  pV P                  WVR7      pV'       d   VP                  MV^,          pV P	                  V4      pV P                  V4      pRp	Ve   V P                  W(V P                   4      p	V'       g"   V3VR,          ,           p
V	e   V	3V
,           # T
# \        V	VVP                  R7      # )ab  
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
    Labels for computing the image classification/regression loss. Indices should be in `[0, ...,
    config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
    `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
Nr-  :r   NN)ÚlossÚlogitsry   )	r   rõ   rÿ   r.  r·   r>  Úloss_functionr   ry   )rF   rJ   rA  rô   rõ   r1  Úoutputsr4  rF  rE  Úoutputs   &&&&&,     r   rQ   Ú*EfficientNetForImageClassification.forward  sÆ   € ð &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆà×#Ñ# LÐitÐ#Óuˆç1<˜×-Ò-À'È!Å*ˆØŸ™ ]Ó3ˆØ—‘ Ó/ˆàˆØÒØ×%Ñ% f°d·k±kÓBˆDçØ�Y ¨¥Õ,ˆFØ)-Ò)9�T�G˜fÕ$ÐE¸vÐEä3ØØØ!×/Ñ/ô
ð 	
r   )r>  r   r·   rÿ   r;  )NNNNr6  r\   s   @@r   r9  r9  þ  s(   ù‡ € õ
ð ÷"
ñ "
ó ÷"
ð "
r   r9  )T)r9  r  rþ   )'rX   rÑ   rL   r   Ú r   r
  Úactivationsr   Úmodeling_outputsr   r   r   Úmodeling_utilsr   Úutilsr	   r
   Úconfiguration_efficientnetr   Ú
get_loggerrT   Úloggerr   r&   r  r(   r=   r^   rk   r€   r‘   r©   r¾   rÌ   rþ   r  r9  Ú__all__rg   r   r   Ú<module>rT     s;  ðñ "ã ã Ý å &Ý !÷ñ õ
 .ß ,Ý :ð 
×	Ò	˜HÓ	%€õ÷@ô(˜RŸY™Yô ô2
 "§)¡)ô 
ô4 §¡ô ô4$ §¡ô $ôN$ R§Y¡Yô $ôN "§)¡)ô ôBN˜Ÿ	™	ô NôbW
˜"Ÿ)™)ô W
ðt ô8 /ó 8ó ð8ð* ô6
Ð3ó 6
ó ð6
ñr ðôô0
Ð)Dó 0
óð0
òf e‚r   