
    hZ                        % S SK r S SKrS SKJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJr  S SKrS SKJrJr  S SKJr  SS	KJrJr  SS
KJrJr  SSKJr  SSKJrJrJr  SSKJr  SSK J!r!J"r"J#r#  / SQr$\ " S S5      5       r% " S S\%5      r& " S S\%5      r' " S S\RP                  5      r) " S S\RP                  5      r* " S S\RP                  5      r+S\\\&\'4      S\,S\\-   S \\   S!\.S"\	S#\+4S$ jr/S%\0S"\	S#\1\\\&\'4      \\-   4   4S& jr2S'\0r3\4\0\	4   \5S('   0 \3ES)S*S+.Er60 \3ES,S-S+.Er7 " S. S/\5      r8 " S0 S1\5      r9 " S2 S3\5      r: " S4 S5\5      r; " S6 S7\5      r< " S8 S9\5      r= " S: S;\5      r> " S< S=\5      r? " S> S?\5      r@ " S@ SA\5      rA " SB SC\5      rB\" 5       \#" SD\8R                  4SE9SSFSG.S \\8   S!\.S"\	S#\+4SH jj5       5       rD\" 5       \#" SD\9R                  4SE9SSFSG.S \\9   S!\.S"\	S#\+4SI jj5       5       rE\" 5       \#" SD\:R                  4SE9SSFSG.S \\:   S!\.S"\	S#\+4SJ jj5       5       rF\" 5       \#" SD\;R                  4SE9SSFSG.S \\;   S!\.S"\	S#\+4SK jj5       5       rG\" 5       \#" SD\<R                  4SE9SSFSG.S \\<   S!\.S"\	S#\+4SL jj5       5       rH\" 5       \#" SD\=R                  4SE9SSFSG.S \\=   S!\.S"\	S#\+4SM jj5       5       rI\" 5       \#" SD\>R                  4SE9SSFSG.S \\>   S!\.S"\	S#\+4SN jj5       5       rJ\" 5       \#" SD\?R                  4SE9SSFSG.S \\?   S!\.S"\	S#\+4SO jj5       5       rK\" 5       \#" SD\@R                  4SE9SSFSG.S \\@   S!\.S"\	S#\+4SP jj5       5       rL\" 5       \#" SD\AR                  4SE9SSFSG.S \\A   S!\.S"\	S#\+4SQ jj5       5       rM\" 5       \#" SD\BR                  4SE9SSFSG.S \\B   S!\.S"\	S#\+4SR jj5       5       rNg)S    N)Sequence)	dataclass)partial)AnyCallableOptionalUnion)nnTensor)StochasticDepth   )Conv2dNormActivationSqueezeExcitation)ImageClassificationInterpolationMode)_log_api_usage_once   )register_modelWeightsWeightsEnum)_IMAGENET_CATEGORIES)_make_divisible_ovewrite_named_paramhandle_legacy_interface)EfficientNetEfficientNet_B0_WeightsEfficientNet_B1_WeightsEfficientNet_B2_WeightsEfficientNet_B3_WeightsEfficientNet_B4_WeightsEfficientNet_B5_WeightsEfficientNet_B6_WeightsEfficientNet_B7_WeightsEfficientNet_V2_S_WeightsEfficientNet_V2_M_WeightsEfficientNet_V2_L_Weightsefficientnet_b0efficientnet_b1efficientnet_b2efficientnet_b3efficientnet_b4efficientnet_b5efficientnet_b6efficientnet_b7efficientnet_v2_sefficientnet_v2_mefficientnet_v2_lc            
           \ rS rSr% \\S'   \\S'   \\S'   \\S'   \\S'   \\S'   \S\R                  4   \S	'   \
SS\S\S\\   S\4S jj5       rSrg
)_MBConvConfig/   expand_ratiokernelstrideinput_channelsout_channels
num_layers.blockNchannels
width_mult	min_valuereturnc                      [        X-  SU5      $ )N   )r   )r<   r=   r>   s      W/var/www/auris/envauris/lib/python3.13/site-packages/torchvision/models/efficientnet.pyadjust_channels_MBConvConfig.adjust_channels9   s    x4aCC     N)__name__
__module____qualname____firstlineno__float__annotations__intr   r
   Modulestaticmethodr   rC   __static_attributes__rF   rE   rB   r3   r3   /   so    KKOCN##D# D5 DXc] D^a D DrE   r3   c                      ^  \ rS rSr   SS\S\S\S\S\S\S	\S
\S\\S\R                  4      SS4U 4S jjjr
\S\S
\4S j5       rSrU =r$ )MBConvConfig>   Nr5   r6   r7   r8   r9   r:   r=   
depth_multr;   .r?   c
           	         > U R                  XG5      nU R                  XW5      nU R                  Xh5      nU	c  [        n	[        T
U ]  XX4XVU	5        g rG   )rC   adjust_depthMBConvsuper__init__)selfr5   r6   r7   r8   r9   r:   r=   rU   r;   	__class__s             rB   rZ   MBConvConfig.__init__@   sS     --nI++LE&&z>
=Ev|afgrE   c                 D    [        [        R                  " X-  5      5      $ rG   )rN   mathceil)r:   rU   s     rB   rW   MBConvConfig.adjust_depthS   s    499Z4566rE   rF   )      ?rb   N)rH   rI   rJ   rK   rL   rN   r   r   r
   rO   rZ   rP   rW   rQ   __classcell__r\   s   @rB   rS   rS   >   s      48hh h 	h
 h h h h h bii01h 
h h& 7 7% 7 7rE   rS   c                   v   ^  \ rS rSr SS\S\S\S\S\S\S	\\S
\R                  4      SS4U 4S jjjr
SrU =r$ )FusedMBConvConfigX   Nr5   r6   r7   r8   r9   r:   r;   .r?   c           	      <   > Uc  [         n[        TU ]	  XX4XVU5        g rG   )FusedMBConvrY   rZ   )	r[   r5   r6   r7   r8   r9   r:   r;   r\   s	           rB   rZ   FusedMBConvConfig.__init__Z   s#     =Ev|afgrE   rF   rG   )rH   rI   rJ   rK   rL   rN   r   r   r
   rO   rZ   rQ   rc   rd   s   @rB   rf   rf   X   s|     59hh h 	h
 h h h bii01h 
h hrE   rf   c                      ^  \ rS rSr\4S\S\S\S\R                  4   S\S\R                  4   SS4
U 4S	 jjjr
S
\S\4S jrSrU =r$ )rX   i   cnfstochastic_depth_prob
norm_layer.se_layerr?   Nc                 X  > [         T	U ]  5         SUR                  s=::  a  S::  d  O  [        S5      eUR                  S:H  =(       a    UR                  UR
                  :H  U l        / n[        R                  nUR                  UR                  UR                  5      nXqR                  :w  a&  UR                  [        UR                  USUUS95        UR                  [        UUUR                  UR                  UUUS95        [        SUR                  S-  5      nUR                  U" Xx[        [        R                  SS9S	95        UR                  [        XqR
                  SUS S95        [        R                   " U6 U l        [%        US
5      U l        UR
                  U l        g )Nr   r   illegal stride valuekernel_sizero   activation_layer)rt   r7   groupsro   ru      T)inplace)
activationrow)rY   rZ   r7   
ValueErrorr8   r9   use_res_connectr
   SiLUrC   r5   appendr   r6   maxr   
Sequentialr;   r   stochastic_depth)
r[   rm   rn   ro   rp   layersru   expanded_channelssqueeze_channelsr\   s
            rB   rZ   MBConv.__init__j   s~    	SZZ$1$344"zzQY33E3EIYIY3Y"$77  //0B0BCDTDTU 2 22MM$&&% !)%5 	 !!JJzz(%!1
	
 q#"4"4"9:h0wWYW^W^hlOmno 	 !#3#3zlp	
 ]]F+
 /0Eu M,,rE   inputc                 t    U R                  U5      nU R                  (       a  U R                  U5      nX!-  nU$ rG   r;   r|   r   r[   r   results      rB   forwardMBConv.forward   5    E"**62FOFrE   r;   r9   r   r|   )rH   rI   rJ   rK   r   rS   rL   r   r
   rO   rZ   r   r   rQ   rc   rd   s   @rB   rX   rX   i   su     .?8-8-  %8- S"))^,	8-
 3		>*8- 
8- 8-tV   rE   rX   c                   l   ^  \ rS rSrS\S\S\S\R                  4   SS4U 4S jjr	S	\
S\
4S
 jrSrU =r$ )ri      rm   rn   ro   .r?   Nc                    > [         TU ]  5         SUR                  s=::  a  S::  d  O  [        S5      eUR                  S:H  =(       a    UR                  UR
                  :H  U l        / n[        R                  nUR                  UR                  UR                  5      nXaR                  :w  aa  UR                  [        UR                  UUR                  UR                  UUS95        UR                  [        XaR
                  SUS S95        OEUR                  [        UR                  UR
                  UR                  UR                  UUS95        [        R                  " U6 U l        [!        US5      U l        UR
                  U l        g )Nr   r   rr   rt   r7   ro   ru   rs   rz   )rY   rZ   r7   r{   r8   r9   r|   r
   r}   rC   r5   r~   r   r6   r   r;   r   r   )r[   rm   rn   ro   r   ru   r   r\   s          rB   rZ   FusedMBConv.__init__   sT    	SZZ$1$344"zzQY33E3EIYIY3Y"$77//0B0BCDTDTU 2 22MM$&&% #

::)%5	 MM$%'7'7QS]pt MM$&&$$ #

::)%5	 ]]F+
 /0Eu M,,rE   r   c                 t    U R                  U5      nU R                  (       a  U R                  U5      nX!-  nU$ rG   r   r   s      rB   r   FusedMBConv.forward   r   rE   r   )rH   rI   rJ   rK   rf   rL   r   r
   rO   rZ   r   r   rQ   rc   rd   s   @rB   ri   ri      sT    2-2-  %2- S"))^,	2-
 
2-hV   rE   ri   c                      ^  \ rS rSr    SS\\\\4      S\S\S\	S\
\S\R                  4      S	\
\	   S
S4U 4S jjjrS\S
\4S jrS\S
\4S jrSrU =r$ )r      Ninverted_residual_settingdropoutrn   num_classesro   .last_channelr?   c                   > [         TU ]  5         [        U 5        U(       d  [        S5      e[	        U[
        5      (       a/  [        U Vs/ s H  n[	        U[        5      PM     sn5      (       d  [        S5      eUc  [        R                  n/ nUS   R                  n	UR                  [        SU	SSU[        R                  S95        [        S U 5       5      n
SnU H  n/ n[!        UR"                  5       Hp  n[$        R$                  " U5      nU(       a  UR&                  Ul        S	Ul        U[+        U5      -  U
-  nUR                  UR-                  UUU5      5        US	-  nMr     UR                  [        R.                  " U6 5        M     US
   R&                  nUb  UOSU-  nUR                  [        UUS	U[        R                  S95        [        R.                  " U6 U l        [        R2                  " S	5      U l        [        R.                  " [        R6                  " USS9[        R8                  " UU5      5      U l        U R=                  5        GH  n[	        U[        R>                  5      (       ab  [        R@                  RC                  URD                  SS9  URF                  b+  [        R@                  RI                  URF                  5        M  M  [	        U[        R                  [        RJ                  45      (       aU  [        R@                  RM                  URD                  5        [        R@                  RI                  URF                  5        GM	  [	        U[        R8                  5      (       d  GM+  S[N        RP                  " URR                  5      -  n[        R@                  RU                  URD                  U* U5        [        R@                  RI                  URF                  5        GM     gs  snf )a  
EfficientNet V1 and V2 main class

Args:
    inverted_residual_setting (Sequence[Union[MBConvConfig, FusedMBConvConfig]]): Network structure
    dropout (float): The droupout probability
    stochastic_depth_prob (float): The stochastic depth probability
    num_classes (int): Number of classes
    norm_layer (Optional[Callable[..., nn.Module]]): Module specifying the normalization layer to use
    last_channel (int): The number of channels on the penultimate layer
z1The inverted_residual_setting should not be emptyz:The inverted_residual_setting should be List[MBConvConfig]Nr      r   r   c              3   8   #    U  H  oR                   v   M     g 7frG   )r:   ).0rm   s     rB   	<genexpr>(EfficientNet.__init__.<locals>.<genexpr>  s      U;TC;Ts   r   rw   rs   T)prx   fan_out)moderb   )+rY   rZ   r   r{   
isinstancer   allr3   	TypeErrorr
   BatchNorm2dr8   r~   r   r}   sumranger:   copyr9   r7   rL   r;   r   featuresAdaptiveAvgPool2davgpoolDropoutLinear
classifiermodulesConv2dinitkaiming_normal_weightbiaszeros_	GroupNormones_r_   sqrtout_featuresuniform_)r[   r   r   rn   r   ro   r   sr   firstconv_output_channelstotal_stage_blocksstage_block_idrm   stage_	block_cnfsd_problastconv_input_channelslastconv_output_channelsm
init_ranger\   s                        rB   rZ   EfficientNet.__init__   s   ( 	D!(PQQ0(;;;TU;TaZ=1;TUVVXYYJ"$ %>a$@$O$O! ,!AR\oqovov	
 ! U;T UU,C%'E3>>* IIcN	 /8/E/EI,'(I$ 0%2GGJ\\Y__YLM!# + MM"--/0# -( #<B"?"L"L3?3K<QRUlQl  '(%!#	
 v.++A.--JJ$/II.<

 A!RYY''''y'A66%GGNN166* &A=>>ahh'qvv&Aryy)) 499Q^^#<<
  J;
Cqvv&  w Vs   Pxc                     U R                  U5      nU R                  U5      n[        R                  " US5      nU R	                  U5      nU$ )Nr   )r   r   torchflattenr   r[   r   s     rB   _forward_implEfficientNet._forward_implM  s@    MM!LLOMM!QOOArE   c                 $    U R                  U5      $ rG   )r   r   s     rB   r   EfficientNet.forwardW  s    !!!$$rE   )r   r   r   )皙?i  NN)rH   rI   rJ   rK   r   r	   rS   rf   rL   rN   r   r   r
   rO   rZ   r   r   r   rQ   rc   rd   s   @rB   r   r      s    
 (+9=&*a'#+E,@Q2Q,R#Sa' a'  %	a'
 a' Xc299n56a' sma' 
a' a'Fv & % %F % %rE   r   r   r   r   weightsprogresskwargsr?   c                     Ub#  [        US[        UR                  S   5      5        [        X4SU0UD6nUb  UR	                  UR                  USS95        U$ )Nr   
categoriesr   T)r   
check_hash)r   lenmetar   load_state_dictget_state_dict)r   r   r   r   r   r   models          rB   _efficientnetr   [  sd     fmSl9S5TU2a,aZ`aEg44hSW4XYLrE   archc                 `   U R                  S5      (       a  [        [        UR                  S5      UR                  S5      S9nU" SSSSSS5      U" S	SS
SSS
5      U" S	SS
SSS
5      U" S	SS
SSS5      U" S	SSSSS5      U" S	SS
SSS5      U" S	SSSSS5      /nS nX44$ U R                  S5      (       aa  [	        SSSSSS
5      [	        SSS
SSS5      [	        SSS
SSS5      [        SSS
SSS	5      [        S	SSSSS5      [        S	SS
SSS5      /nSnX44$ U R                  S5      (       ap  [	        SSSSSS5      [	        SSS
SSS5      [	        SSS
SSS5      [        SSS
SSS5      [        S	SSSSS5      [        S	SS
SS S!5      [        S	SSS S"S5      /nSnX44$ U R                  S#5      (       ap  [	        SSSSSS5      [	        SSS
SSS5      [	        SSS
SS$S5      [        SSS
S$SS%5      [        S	SSSS&S'5      [        S	SS
S&S(S)5      [        S	SSS(S*S5      /nSnX44$ [        S+U  35      e),Nefficientnet_br=   rU   r=   rU   r   r             r         (   P   p      rw   @  r/   0   @         	         i   r0            i0        r1   `   
              i  zUnsupported model type )
startswithr   rS   poprf   r{   )r   r   
bneck_confr   r   s        rB   _efficientnet_confr  n  s   
 '((\fjj6N[a[e[efr[st
q!QB*q!QB*q!QB*q!QB*q!QC+q!QS!,q!QS!,%
! H %22G 
,	-	-aAr2q1aAr2q1aAr2q1Aq"c1-Aq#sA.Aq#sB/%
! 4 %223 
,	-	-aAr2q1aAr2q1aAr2q1Aq"c1-Aq#sB/Aq#sB/Aq#sA.%
!  %22 
,	-	-aAr2q1aAr2q1aAr2q1Aq"c2.Aq#sB/Aq#sB/Aq#sA.%
!  %22 24&9::rE   r   _COMMON_META)r   r   zUhttps://github.com/pytorch/vision/tree/main/references/classification#efficientnet-v1)min_sizerecipe)!   r	  zUhttps://github.com/pytorch/vision/tree/main/references/classification#efficientnet-v2c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSS	S
.0SSSS.ES9r
\
rSrg)r   i  zJhttps://download.pytorch.org/models/efficientnet_b0_rwightman-7f5810bc.pthr   r   	crop_sizeresize_sizeinterpolationidP ImageNet-1Kg?5^IlS@g5^IbW@zacc@1zacc@5gNbX9?g~jts4@1These weights are ported from the original paper.
num_params_metrics_ops
_file_size_docsurl
transformsr   rF   NrH   rI   rJ   rK   r   r   r   r   BICUBIC_COMMON_META_V1IMAGENET1K_V1DEFAULTrQ   rF   rE   rB   r   r     a    X3CO`OhOh


!##   L
M( GrE   r   c                       \ rS rSr\" S\" \SS\R                  S90 \	ESSSS	S
.0SSSS.ES9r
\" S\" \SS\R                  S90 \	ESSSSSS
.0SSSS.ES9r\rSrg)r   i  zJhttps://download.pytorch.org/models/efficientnet_b1_rwightman-bac287d4.pth   r   r  iv r  g+S@gClW@r  gCl?gM">@r  r  r  z@https://download.pytorch.org/models/efficientnet_b1-c27df63c.pth   zOhttps://github.com/pytorch/vision/issues/3995#new-recipe-with-lr-wd-crop-tuninggʡS@gƻW@gA`">@$  
                These weights improve upon the results of the original paper by using a modified version of TorchVision's
                `new training recipe
                <https://pytorch.org/blog/how-to-train-state-of-the-art-models-using-torchvision-latest-primitives/>`_.
            )r  r  r  r  r  r  rF   N)rH   rI   rJ   rK   r   r   r   r   r  r  r  BILINEARIMAGENET1K_V2r  rQ   rF   rE   rB   r   r     s    X3CO`OhOh


!##   L
M( N3CO`OiOi


!g##   
M0 GrE   r   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSSS	.0S
SSS.ES9r
\
rSrg)r   r   zJhttps://download.pytorch.org/models/efficientnet_b2_rwightman-c35c1473.pthi   r  i r  gx&T@gp=
W@r  g rh?gʡEA@r  r  r  rF   Nr  rF   rE   rB   r   r      r   rE   r   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSS	S
.0SSSS.ES9r
\
rSrg)r   i  zJhttps://download.pytorch.org/models/efficientnet_b3_rwightman-b3899882.pthi,  r   r  i r  gnT@g~jtX@r  gZd;?gd;OG@r  r  r  rF   Nr  rF   rE   rB   r   r     a    X3CO`OhOh


"##   L
M( GrE   r   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSS	S
.0SSSS.ES9r
\
rSrg)r    i0  zJhttps://download.pytorch.org/models/efficientnet_b4_rwightman-23ab8bcd.pthi|  r   r  i0!'r  gjtT@gt&X@r  g~jt@gKR@r  r  r  rF   Nr  rF   rE   rB   r    r    0  r)  rE   r    c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSSS	.0S
SSS.ES9r
\
rSrg)r!   iH  zJhttps://download.pytorch.org/models/efficientnet_b5_lukemelas-1a07897c.pthi  r  ir  g#~jT@gx&1(X@r  gx&1$@gK7]@r  r  r  rF   Nr  rF   rE   rB   r!   r!   H  a    X3CO`OhOh


"##  !L
M( GrE   r!   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSSS	.0S
SSS.ES9r
\
rSrg)r"   i`  zJhttps://download.pytorch.org/models/efficientnet_b6_lukemelas-24a108a5.pthi  r  ir  gn U@gv:X@r  g rh3@g$d@r  r  r  rF   Nr  rF   rE   rB   r"   r"   `  r,  rE   r"   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSSS	.0S
SSS.ES9r
\
rSrg)r#   ix  zJhttps://download.pytorch.org/models/efficientnet_b7_lukemelas-c5b4e57e.pthiX  r  icr  g+U@g'1:X@r  gsh|B@go@r  r  r  rF   Nr  rF   rE   rB   r#   r#   x  r,  rE   r#   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSSS	.0S
SSS.ES9r
\
rSrg)r$   i  zBhttps://download.pytorch.org/models/efficientnet_v2_s-dd5fe13b.pthr   r  i8nGr  g;OU@gx&18X@r  gZd @gVT@r$  r  r  rF   NrH   rI   rJ   rK   r   r   r   r   r%  _COMMON_META_V2r  r  rQ   rF   rE   rB   r$   r$     se    P+44	


"##   
M4 GrE   r$   c                   h    \ rS rSr\" S\" \SS\R                  S90 \	ESSSSS	.0S
SSS.ES9r
\
rSrg)r%   i  zBhttps://download.pytorch.org/models/efficientnet_v2_m-dc08266a.pth  r  i:r  gI+GU@gDlIX@r  gE8@gQ j@r$  r  r  rF   Nr0  rF   rE   rB   r%   r%     se    P+44	


"##   
M4 GrE   r%   c                   l    \ rS rSr\" S\" \SS\R                  SSS90 \	ESSSS	S
.0SSSS.ES9r
\
rSrg)r&   i  zBhttps://download.pytorch.org/models/efficientnet_v2_l-59c71312.pthr3  )      ?r5  r5  )r  r  r  meanstdiHfr  gʡEsU@gOnrX@r  g
ףp=
L@gI+i|@r  r  r  rF   N)rH   rI   rJ   rK   r   r   r   r   r  r1  r  r  rQ   rF   rE   rB   r&   r&     si    P+33 


###  !L
M0 GrE   r&   
pretrained)r   T)r   r   c                     [         R                  U 5      n [        SSSS9u  p4[        X2R	                  SS5      X@U40 UD6$ )a  EfficientNet B0 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B0_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B0_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B0_Weights
    :members:
r'   rb   r   r   r   )r   verifyr  r   r  r   r   r   r   r   s        rB   r'   r'     Q    . &,,W5G.@AR_bor.s+!::i#=|V^bh rE   c                     [         R                  U 5      n [        SSSS9u  p4[        X2R	                  SS5      X@U40 UD6$ )a  EfficientNet B1 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B1_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B1_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B1_Weights
    :members:
r(   rb   皙?r   r   r   )r   r:  r  r   r  r;  s        rB   r(   r(     r<  rE   c                     [         R                  U 5      n [        SSSS9u  p4[        X2R	                  SS5      X@U40 UD6$ )a  EfficientNet B2 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B2_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B2_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B2_Weights
    :members:
r)   r>  333333?r   r   333333?)r   r:  r  r   r  r;  s        rB   r)   r)   '  r<  rE   c                     [         R                  U 5      n [        SSSS9u  p4[        UUR	                  SS5      UU U40 UD6$ )a  EfficientNet B3 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B3_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B3_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B3_Weights
    :members:
r*   r@  ffffff?r   r   rA  )r   r:  r  r   r  r;  s        rB   r*   r*   F  Z    . &,,W5G.@AR_bor.s+!

9c"  rE   c                     [         R                  U 5      n [        SSSS9u  p4[        UUR	                  SS5      UU U40 UD6$ )a  EfficientNet B4 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B4_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B4_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B4_Weights
    :members:
r+   rC  ?r   r   皙?)r    r:  r  r   r  r;  s        rB   r+   r+   j  rD  rE   c           
          [         R                  U 5      n [        SSSS9u  p4[        UUR	                  SS5      UU U4S[        [        R                  SS	S
90UD6$ )a  EfficientNet B5 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B5_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B5_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B5_Weights
    :members:
r,   g?g@r   r   rG  ro   MbP?{Gz?epsmomentum)r!   r:  r  r   r  r   r
   r   r;  s        rB   r,   r,     q    . &,,W5G.@AR_bor.s+!

9c" 2>>utD  rE   c           
          [         R                  U 5      n [        SSSS9u  p4[        UUR	                  SS5      UU U4S[        [        R                  SS	S
90UD6$ )a  EfficientNet B6 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B6_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B6_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B6_Weights
    :members:
r-   rF  g@r   r   r5  ro   rI  rJ  rK  )r"   r:  r  r   r  r   r
   r   r;  s        rB   r-   r-     rN  rE   c           
          [         R                  U 5      n [        SSSS9u  p4[        UUR	                  SS5      UU U4S[        [        R                  SS	S
90UD6$ )a  EfficientNet B7 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional
Neural Networks <https://arxiv.org/abs/1905.11946>`_ paper.

Args:
    weights (:class:`~torchvision.models.EfficientNet_B7_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_B7_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_B7_Weights
    :members:
r.   g       @g@r   r   r5  ro   rI  rJ  rK  )r#   r:  r  r   r  r   r
   r   r;  s        rB   r.   r.     rN  rE   c           	          [         R                  U 5      n [        S5      u  p4[        UUR	                  SS5      UU U4S[        [        R                  SS90UD6$ )a  
Constructs an EfficientNetV2-S architecture from
`EfficientNetV2: Smaller Models and Faster Training <https://arxiv.org/abs/2104.00298>`_.

Args:
    weights (:class:`~torchvision.models.EfficientNet_V2_S_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_V2_S_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_V2_S_Weights
    :members:
r/   r   r   ro   rI  rL  )r$   r:  r  r   r  r   r
   r   r;  s        rB   r/   r/     i    0 (..w7G.@AT.U+!

9c" 2>>u5  rE   c           	          [         R                  U 5      n [        S5      u  p4[        UUR	                  SS5      UU U4S[        [        R                  SS90UD6$ )a  
Constructs an EfficientNetV2-M architecture from
`EfficientNetV2: Smaller Models and Faster Training <https://arxiv.org/abs/2104.00298>`_.

Args:
    weights (:class:`~torchvision.models.EfficientNet_V2_M_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_V2_M_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_V2_M_Weights
    :members:
r0   r   rA  ro   rI  rR  )r%   r:  r  r   r  r   r
   r   r;  s        rB   r0   r0   #  rS  rE   c           	          [         R                  U 5      n [        S5      u  p4[        UUR	                  SS5      UU U4S[        [        R                  SS90UD6$ )a  
Constructs an EfficientNetV2-L architecture from
`EfficientNetV2: Smaller Models and Faster Training <https://arxiv.org/abs/2104.00298>`_.

Args:
    weights (:class:`~torchvision.models.EfficientNet_V2_L_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.EfficientNet_V2_L_Weights` below for
        more details, and possible values. By default, no pre-trained
        weights are used.
    progress (bool, optional): If True, displays a progress bar of the
        download to stderr. Default is True.
    **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/efficientnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.EfficientNet_V2_L_Weights
    :members:
r1   r   rG  ro   rI  rR  )r&   r:  r  r   r  r   r
   r   r;  s        rB   r1   r1   I  rS  rE   )Or   r_   collections.abcr   dataclassesr   	functoolsr   typingr   r   r   r	   r   r
   r   torchvision.opsr   ops.miscr   r   transforms._presetsr   r   utilsr   _apir   r   r   _metar   _utilsr   r   r   __all__r3   rS   rf   rO   rX   ri   r   rL   rN   boolr   strtupler  r  dictrM   r  r1  r   r   r   r   r    r!   r"   r#   r$   r%   r&   r  r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   rF   rE   rB   <module>rf     s     $ !  1 1   + > H ' 6 6 ' S S6 D D D7= 74h h"@RYY @F:")) :zo%299 o%d'l<M.M(NO 3- k"	
   &43
4343 8E,(99:;Xc]JK43p & d38n 
eek 0-k -`k 0k 0k 0k 0k 0k 0 < < : ,0G0U0U!VW48401DH[^ X : ,0G0U0U!VW48401DH[^ X : ,0G0U0U!VW48401DH[^ X : ,0G0U0U!VW48401DH[^ X D ,0G0U0U!VW48401DH[^ X D ,0G0U0U!VW484 01 DH [^   X  F ,0G0U0U!VW484 01 DH [^   X  F ,0G0U0U!VW484 01 DH [^   X  F ,0I0W0W!XY6:T!23!FJ!]`!! Z !H ,0I0W0W!XY6:T!23!FJ!]`!! Z !H ,0I0W0W!XY6:T!23!FJ!]`!! Z !rE   