o
    ôjR¨  ã                   @   s2  U d dl Z d dlZd dlmZ d dlmZ d dlmZmZm	Z	m
Z
mZmZmZmZ d dlZd dlmZmZ d dlmZ ddlmZmZ dd	lmZmZ dd
lmZ ddlmZmZmZ ddl m!Z! ddl"m#Z#m$Z$m%Z% g d¢Z&eG dd„ dƒƒZ'G dd„ de'ƒZ(G dd„ de'ƒZ)G dd„ dej*ƒZ+G dd„ dej*ƒZ,G dd„ dej*ƒZ-deee(e)f  de.dee/ dee d e0d!ed"e-fd#d$„Z1d%e2d!ed"eeee(e)f  ee/ f fd&d'„Z3d(e!iZ4e	e2ef e5d)< i e4¥d*d+d,œ¥Z6i e4¥d-d.d,œ¥Z7G d/d0„ d0eƒZ8G d1d2„ d2eƒZ9G d3d4„ d4eƒZ:G d5d6„ d6eƒZ;G d7d8„ d8eƒZ<G d9d:„ d:eƒZ=G d;d<„ d<eƒZ>G d=d>„ d>eƒZ?G d?d@„ d@eƒZ@G dAdB„ dBeƒZAG dCdD„ dDeƒZBeƒ e%dEe8jCfdF�ddGdHœdee8 d e0d!ed"e-fdIdJ„ƒƒZDeƒ e%dEe9jCfdF�ddGdHœdee9 d e0d!ed"e-fdKdL„ƒƒZEeƒ e%dEe:jCfdF�ddGdHœdee: d e0d!ed"e-fdMdN„ƒƒZFeƒ e%dEe;jCfdF�ddGdHœdee; d e0d!ed"e-fdOdP„ƒƒZGeƒ e%dEe<jCfdF�ddGdHœdee< d e0d!ed"e-fdQdR„ƒƒZHeƒ e%dEe=jCfdF�ddGdHœdee= d e0d!ed"e-fdSdT„ƒƒZIeƒ e%dEe>jCfdF�ddGdHœdee> d e0d!ed"e-fdUdV„ƒƒZJeƒ e%dEe?jCfdF�ddGdHœdee? d e0d!ed"e-fdWdX„ƒƒZKeƒ e%dEe@jCfdF�ddGdHœdee@ d e0d!ed"e-fdYdZ„ƒƒZLeƒ e%dEeAjCfdF�ddGdHœdeeA d e0d!ed"e-fd[d\„ƒƒZMeƒ e%dEeBjCfdF�ddGdHœdeeB d e0d!ed"e-fd]d^„ƒƒZNdS )_é    N)Ú	dataclass)Úpartial)ÚAnyÚCallableÚDictÚListÚOptionalÚSequenceÚTupleÚ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                
   @   st   e Zd ZU eed< eed< eed< eed< eed< eed< edejf ed< e	dd
edede
e defdd„ƒZd	S )Ú_MBConvConfigÚexpand_ratioÚkernelÚstrideÚinput_channelsÚout_channelsÚ
num_layers.ÚblockNÚchannelsÚ
width_multÚ	min_valueÚreturnc                 C   s   t | | d|ƒS )Né   )r   )r<   r=   r>   © rA   úp/var/www/html/academy/tools/voices/clone/sv-venv/lib/python3.10/site-packages/torchvision/models/efficientnet.pyÚadjust_channels8   s   z_MBConvConfig.adjust_channels©N)Ú__name__Ú
__module__Ú__qualname__ÚfloatÚ__annotations__Úintr   r   ÚModuleÚstaticmethodr   rC   rA   rA   rA   rB   r4   .   s   
 &r4   c                       sr   e Zd Z			ddedededededed	ed
edeedejf  ddf‡ fdd„Z	e
ded
efdd„ƒZ‡  ZS )ÚMBConvConfigç      ð?Nr5   r6   r7   r8   r9   r:   r=   Ú
depth_multr;   .r?   c
           
   	      sL   |   ||¡}|   ||¡}|  ||¡}|	d u rt}	tƒ  |||||||	¡ d S rD   )rC   Úadjust_depthÚMBConvÚsuperÚ__init__)
Úselfr5   r6   r7   r8   r9   r:   r=   rO   r;   ©Ú	__class__rA   rB   rS   ?   s   zMBConvConfig.__init__c                 C   s   t t | | ¡ƒS rD   )rJ   ÚmathÚceil)r:   rO   rA   rA   rB   rP   R   s   zMBConvConfig.adjust_depth)rN   rN   N)rE   rF   rG   rH   rJ   r   r   r   rK   rS   rL   rP   Ú__classcell__rA   rA   rU   rB   rM   =   s6    
öþýüûúùø	÷
öõrM   c                       sP   e Zd Z	ddededededededeed	ejf  d
df‡ fdd„Z	‡  Z
S )ÚFusedMBConvConfigNr5   r6   r7   r8   r9   r:   r;   .r?   c              	      s(   |d u rt }tƒ  |||||||¡ d S rD   )ÚFusedMBConvrR   rS   )rT   r5   r6   r7   r8   r9   r:   r;   rU   rA   rB   rS   Y   s   
zFusedMBConvConfig.__init__rD   )rE   rF   rG   rH   rJ   r   r   r   rK   rS   rY   rA   rA   rU   rB   rZ   W   s&    
øþýüûúùø	÷rZ   c                       s\   e Zd Zefdedededejf dedejf ddf
‡ fdd	„Z	d
e
de
fdd„Z‡  ZS )rQ   ÚcnfÚstochastic_depth_probÚ
norm_layer.Úse_layerr?   Nc           	         s  t ƒ  ¡  d|j  krdkstdƒ‚ tdƒ‚|jdko"|j|jk| _g }tj}| 	|j|j
¡}||jkrC| t|j|d||d�¡ | t|||j|j|||d�¡ td|jd ƒ}| |||ttjdd�d	�¡ | t||jd|d d�¡ tj|Ž | _t|d
ƒ| _|j| _d S )Nr   r   úillegal stride value©Úkernel_sizer^   Úactivation_layer)rb   r7   Úgroupsr^   rc   é   T)Úinplace)Ú
activationÚrow)rR   rS   r7   Ú
ValueErrorr8   r9   Úuse_res_connectr   ÚSiLUrC   r5   Úappendr   r6   Úmaxr   Ú
Sequentialr;   r   Ústochastic_depth)	rT   r\   r]   r^   r_   Úlayersrc   Úexpanded_channelsÚsqueeze_channelsrU   rA   rB   rS   i   sP   
ÿ
ûÿùÿÿÿzMBConv.__init__Úinputc                 C   ó&   |   |¡}| jr|  |¡}||7 }|S rD   ©r;   rj   ro   ©rT   rs   ÚresultrA   rA   rB   Úforward£   ó
   

zMBConv.forward)rE   rF   rG   r   rM   rH   r   r   rK   rS   r   rx   rY   rA   rA   rU   rB   rQ   h   s    ûþýüûú:rQ   c                       sJ   e Zd Zdedededejf ddf‡ fdd„Zd	e	de	fd
d„Z
‡  ZS )r[   r\   r]   r^   .r?   Nc              
      sî   t ƒ  ¡  d|j  krdkstdƒ‚ tdƒ‚|jdko"|j|jk| _g }tj}| 	|j|j
¡}||jkrT| t|j||j|j||d�¡ | t||jd|d d�¡ n| t|j|j|j|j||d�¡ tj|Ž | _t|dƒ| _|j| _d S )Nr   r   r`   ©rb   r7   r^   rc   ra   rh   )rR   rS   r7   ri   r8   r9   rj   r   rk   rC   r5   rl   r   r6   rn   r;   r   ro   )rT   r\   r]   r^   rp   rc   rq   rU   rA   rB   rS   ¬   sL   
ÿ
úÿÿÿúÿzFusedMBConv.__init__rs   c                 C   rt   rD   ru   rv   rA   rA   rB   rx   à   ry   zFusedMBConv.forward)rE   rF   rG   rZ   rH   r   r   rK   rS   r   rx   rY   rA   rA   rU   rB   r[   «   s    þýüû4r[   c                       s†   e Zd Z				ddeeeef  dededede	e
d	ejf  d
e	e ddf‡ fdd„Zdedefdd„Zdedefdd„Z‡  ZS )r   çš™™™™™É?éè  NÚinverted_residual_settingÚdropoutr]   Únum_classesr^   .Úlast_channelr?   c              
      s0  t ƒ  ¡  t| ƒ |stdƒ‚t|tƒrtdd„ |D ƒƒs!tdƒ‚|du r(tj	}g }|d j
}| td|dd|tjd	�¡ td
d„ |D ƒƒ}	d}
|D ]8}g }t|jƒD ]&}t |¡}|rc|j|_
d|_|t|
ƒ |	 }| | |||¡¡ |
d7 }
qS| tj|Ž ¡ qJ|d j}|durŽ|nd| }| t||d|tjd�¡ tj|Ž | _t d¡| _t tj|dd�t ||¡¡| _|  ¡ D ]V}t|tjƒrÝtjj |j!dd� |j"durÜtj #|j"¡ q¿t|tj	tj$fƒrõtj %|j!¡ tj #|j"¡ q¿t|tjƒ�rdt& '|j(¡ }tj )|j!| |¡ tj #|j"¡ q¿dS )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 emptyc                 S   s   g | ]}t |tƒ‘qS rA   )Ú
isinstancer4   )Ú.0ÚsrA   rA   rB   Ú
<listcomp>  s    z)EfficientNet.__init__.<locals>.<listcomp>z:The inverted_residual_setting should be List[MBConvConfig]Nr   é   r   rz   c                 s   s   � | ]}|j V  qd S rD   )r:   )r‚   r\   rA   rA   rB   Ú	<genexpr>  s   € z(EfficientNet.__init__.<locals>.<genexpr>r   éÿÿÿÿre   ra   T)Úprf   Úfan_out)ÚmoderN   )*rR   rS   r   ri   r�   r	   ÚallÚ	TypeErrorr   ÚBatchNorm2dr8   rl   r   rk   ÚsumÚranger:   Úcopyr9   r7   rH   r;   rn   ÚfeaturesÚAdaptiveAvgPool2dÚavgpoolÚDropoutÚLinearÚ
classifierÚmodulesÚConv2dÚinitÚkaiming_normal_ÚweightÚbiasÚzeros_Ú	GroupNormÚones_rW   ÚsqrtÚout_featuresÚuniform_)rT   r}   r~   r]   r   r^   r€   rp   Úfirstconv_output_channelsÚtotal_stage_blocksÚstage_block_idr\   ÚstageÚ_Z	block_cnfÚsd_probZlastconv_input_channelsÚlastconv_output_channelsÚmÚ
init_rangerU   rA   rB   rS   é   s~   
ÿþ
ÿÿ


ûÿ

þ
€€õzEfficientNet.__init__Úxc                 C   s.   |   |¡}|  |¡}t |d¡}|  |¡}|S )Nr   )r‘   r“   ÚtorchÚflattenr–   ©rT   r¬   rA   rA   rB   Ú_forward_implL  s
   


zEfficientNet._forward_implc                 C   s
   |   |¡S rD   )r°   r¯   rA   rA   rB   rx   V  s   
zEfficientNet.forward)r{   r|   NN)rE   rF   rG   r	   r   rM   rZ   rH   rJ   r   r   r   rK   rS   r   r°   rx   rY   rA   rA   rU   rB   r   è   s,    ùþýüûúùøc
r   r}   r~   r€   ÚweightsÚprogressÚkwargsr?   c                 K   sT   |d urt |dt|jd ƒƒ t| |fd|i|¤Ž}|d ur(| |j|dd�¡ |S )Nr   Ú
categoriesr€   T)r²   Ú
check_hash)r   ÚlenÚmetar   Úload_state_dictÚget_state_dict)r}   r~   r€   r±   r²   r³   ÚmodelrA   rA   rB   Ú_efficientnetZ  s   r»   Úarchc                 K   sB  |   d¡rRtt| d¡| d¡d�}|ddddddƒ|d	dd
ddd
ƒ|d	dd
ddd
ƒ|d	dd
dddƒ|d	dddddƒ|d	dd
dddƒ|d	dddddƒg}d }||fS |   d¡r�tdddddd
ƒtddd
dddƒtddd
dddƒtddd
ddd	ƒtd	dddddƒtd	dd
dddƒg}d}||fS |   d¡rÔtddddddƒtddd
dddƒtddd
dddƒtddd
dddƒtd	dddddƒtd	dd
dd d!ƒtd	ddd d"dƒg}d}||fS |   d#¡�rtddddddƒtddd
dddƒtddd
dd$dƒtddd
d$dd%ƒtd	dddd&d'ƒtd	dd
d&d(d)ƒtd	ddd(d*dƒg}d}||fS td+| › �ƒ‚),NZefficientnet_br=   rO   ©r=   rO   r   r…   é    é   é   r   é   é   é(   éP   ép   éÀ   re   é@  r1   é0   é@   é€   é    é	   é   é   i   r2   é   é°   é   i0  é   i   r3   é`   é
   éà   é   é€  é   i€  zUnsupported model type )Ú
startswithr   rM   ÚpoprZ   ri   )r¼   r³   Z
bneck_confr}   r€   rA   rA   rB   Ú_efficientnet_confm  sZ   
ù	$
Ýú
çù	òù	þrÛ   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                
   @   óJ   e Zd Zedeeddejd�i e¥ddddd	œid
dddœ¥d�Z	e	Z
dS )r   zJhttps://download.pytorch.org/models/efficientnet_b0_rwightman-7f5810bc.pthrÕ   rÍ   ©Ú	crop_sizeÚresize_sizeÚinterpolationid²P úImageNet-1Kg?5^ºIlS@g5^ºIbW@©zacc@1zacc@5gNbX9´Ø?gú~j¼ts4@ú1These weights are ported from the original paper.©Ú
num_paramsÚ_metricsÚ_opsÚ
_file_sizeÚ_docs©ÚurlÚ
transformsr·   N©rE   rF   rG   r   r   r   r   ÚBICUBICÚ_COMMON_META_V1ÚIMAGENET1K_V1ÚDEFAULTrA   rA   rA   rB   r   ·  ó*    
ÿÿþÿõúr   c                   @   s†   e Zd Zedeeddejd�i e¥ddddd	œid
dddœ¥d�Z	edeeddej
d�i e¥dddddd	œid
dddœ¥d�ZeZdS )r   zJhttps://download.pytorch.org/models/efficientnet_b1_rwightman-bac287d4.pthéð   rÍ   rá   iîv rå   g+‡©S@g–C‹lç‹W@ræ   g–C‹lçûå?gü©ñÒM">@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@g‰A`åÐ">@á$  
                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í   N)rE   rF   rG   r   r   r   r   rò   ró   rô   ÚBILINEARZIMAGENET1K_V2rõ   rA   rA   rA   rB   r   Ï  sR    
ÿÿþÿõú
ÿÿþÿôûr   c                
   @   óJ   e Zd Zedeeddejd�i e¥dddddœid	d
ddœ¥d�Z	e	Z
dS )r    zJhttps://download.pytorch.org/models/efficientnet_b2_rwightman-c35c1473.pthi   rá   iê‹ rå   gôýÔxé&T@g¤p=
×ÓW@ræ   gœÄ °rhñ?gƒÀÊ¡E–A@rç   rè   rî   Nrñ   rA   rA   rA   rB   r    ÿ  rö   r    c                
   @   rà   )r!   zJhttps://download.pytorch.org/models/efficientnet_b3_rwightman-b3899882.pthi,  rÇ   rá   iªº rå   g�—nƒ€T@gú~j¼tX@ræ   g¬Zd;ý?gd;ßO�—G@rç   rè   rî   Nrñ   rA   rA   rA   rB   r!     rö   r!   c                
   @   rà   )r"   zJhttps://download.pytorch.org/models/efficientnet_b4_rwightman-23ab8bcd.pthi|  r×   rá   i0!'rå   gj¼t“ØT@g¼t“&X@ræ   gú~j¼t“@gžï§ÆKŸR@rç   rè   rî   Nrñ   rA   rA   rA   rB   r"   /  rö   r"   c                
   @   rû   )r#   zJhttps://download.pytorch.org/models/efficientnet_b5_lukemelas-1a07897c.pthiÈ  rá   i¶Ïrå   g#Ûù~jÜT@gÕxé&1(X@ræ   gÕxé&1ˆ$@gžï§ÆK7]@rç   rè   rî   Nrñ   rA   rA   rA   rB   r#   G  rö   r#   c                
   @   rû   )r$   zJhttps://download.pytorch.org/models/efficientnet_b6_lukemelas-24a108a5.pthi  rá   iÀ¿�rå   g�—nƒ U@g´Èv¾Ÿ:X@ræ   gÅ °rh3@gÝ$�•«d@rç   rè   rî   Nrñ   rA   rA   rA   rB   r$   _  rö   r$   c                
   @   rû   )r%   zJhttps://download.pytorch.org/models/efficientnet_b7_lukemelas-c5b4e57e.pthiX  rá   i¸côrå   g+‡ÙÎU@g'1¬:X@ræ   gsh‘í|ßB@gš™™™™Õo@rç   rè   rî   Nrñ   rA   rA   rA   rB   r%   w  rö   r%   c                
   @   rû   )r&   zBhttps://download.pytorch.org/models/efficientnet_v2_s-dd5fe13b.pthr×   rá   i8nGrå   g;ßO�—U@gÕxé&18X@ræ   g¬Zd» @g“V­T@rù   rè   rî   N©rE   rF   rG   r   r   r   r   rú   Ú_COMMON_META_V2rô   rõ   rA   rA   rA   rB   r&   �  ó0    üÿþÿõør&   c                
   @   rû   )r'   zBhttps://download.pytorch.org/models/efficientnet_v2_m-dc08266a.pthéà  rá   iÜ:rå   gºI+GU@gD‹lçûIX@ræ   g¢E¶óý”8@g¸…ëQ j@rù   rè   rî   Nrü   rA   rA   rA   rB   r'   ­  rþ   r'   c                
   @   sN   e Zd Zedeeddejddd�i e¥ddddd	œid
dddœ¥d�Z	e	Z
dS )r(   zBhttps://download.pytorch.org/models/efficientnet_v2_l-59c71312.pthrÿ   )ç      à?r   r   )râ   rã   rä   ÚmeanÚstdiHfrå   gÁÊ¡E¶sU@gßO�—nrX@ræ   g
×£p=
L@gºI+i|@rç   rè   rî   N)rE   rF   rG   r   r   r   r   rò   rý   rô   rõ   rA   rA   rA   rB   r(   Ë  s4    úÿþÿõör(   Ú
pretrained)r±   T)r±   r²   c                 K   s<   t  | ¡} tdddd�\}}t|| dd¡|| |fi |¤ŽS )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)   rN   r½   r~   r{   )r   ÚverifyrÛ   r»   rÚ   ©r±   r²   r³   r}   r€   rA   rA   rB   r)   è  ó   
ÿÿr)   c                 K   ó<   t  | ¡} tdddd�\}}t|| dd¡|| |fi |¤ŽS )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*   rN   çš™™™™™ñ?r½   r~   r{   )r   r  rÛ   r»   rÚ   r  rA   rA   rB   r*     r  r*   c                 K   r  )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  rA   rA   rB   r+   &  r  r+   c                 K   r  )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~   r
  )r!   r  rÛ   r»   rÚ   r  rA   rA   rB   r,   E  ó   

ûúr,   c                 K   r  )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-   r  çÍÌÌÌÌÌü?r½   r~   çš™™™™™Ù?)r"   r  rÛ   r»   rÚ   r  rA   rA   rB   r-   i  r  r-   c                 K   óL   t  | ¡} tdddd�\}}t|| dd¡|| |fdttjdd	d
�i|¤ŽS )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~   r  r^   çü©ñÒMbP?ç{®Gáz„?©ÚepsÚmomentum)r#   r  rÛ   r»   rÚ   r   r   r�   r  rA   rA   rB   r.   �  ó   

ûúùr.   c                 K   r  )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/   r  gÍÌÌÌÌÌ@r½   r~   r   r^   r  r  r  )r$   r  rÛ   r»   rÚ   r   r   r�   r  rA   rA   rB   r/   ²  r  r/   c                 K   r  )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:
    r0   g       @gÍÌÌÌÌÌ@r½   r~   r   r^   r  r  r  )r%   r  rÛ   r»   rÚ   r   r   r�   r  rA   rA   rB   r0   ×  r  r0   c                 K   óD   t  | ¡} tdƒ\}}t|| dd¡|| |fdttjdd�i|¤ŽS )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:
    r1   r~   r{   r^   r  ©r  )r&   r  rÛ   r»   rÚ   r   r   r�   r  rA   rA   rB   r1   ü  ó   

ûúùr1   c                 K   r  )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:
    r2   r~   r
  r^   r  r  )r'   r  rÛ   r»   rÚ   r   r   r�   r  rA   rA   rB   r2   "  r  r2   c                 K   r  )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:
    r3   r~   r  r^   r  r  )r(   r  rÛ   r»   rÚ   r   r   r�   r  rA   rA   rB   r3   H  r  r3   )Or�   rW   Údataclassesr   Ú	functoolsr   Útypingr   r   r   r   r   r	   r
   r   r­   r   r   Ztorchvision.opsr   Zops.miscr   r   Ztransforms._presetsr   r   Úutilsr   Ú_apir   r   r   Ú_metar   Ú_utilsr   r   r   Ú__all__r4   rM   rZ   rK   rQ   r[   r   rH   rJ   Úboolr»   ÚstrrÛ   rÜ   rI   ró   rý   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   rô   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   rA   rA   rA   rB   Ú<module>   s’  
 (C=rÿþýüûú
ùÿþ
ý8ÿÿýÿý0ÿÿÿÿþÿÿÿÿþÿÿÿÿþÿÿÿÿþ"ÿÿÿÿþ"ÿÿÿÿþ#ÿÿÿÿþ#ÿÿÿÿþ#ÿÿÿÿþ$ÿÿÿÿþ$ÿÿÿÿþ