ó
    Eñi˜  ã                   ó¶  • 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	  S SKJ
r
  SSK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  / SQrSES\S\S\S\S\S\	R4                  4S jjrSFS\S\S\S\	R4                  4S jjr " S S\	R:                  5      r " S S\	R:                  5      r " S S\	R:                  5      r S\!\\\4      S\"\   S\\   S\#S\S\ 4S  jr$S!\S".r% " S# S$\5      r& " S% S&\5      r' " S' S(\5      r( " S) S*\5      r) " S+ S,\5      r* " S- S.\5      r+ " S/ S0\5      r, " S1 S2\5      r- " S3 S4\5      r. " S5 S6\5      r/\" 5       \" S7\&R`                  4S89SS9S:.S\\&   S\#S\S\ 4S; jj5       5       r1\" 5       \" S7\'R`                  4S89SS9S:.S\\'   S\#S\S\ 4S< jj5       5       r2\" 5       \" S7\(R`                  4S89SS9S:.S\\(   S\#S\S\ 4S= jj5       5       r3\" 5       \" S7\)R`                  4S89SS9S:.S\\)   S\#S\S\ 4S> jj5       5       r4\" 5       \" S7\*R`                  4S89SS9S:.S\\*   S\#S\S\ 4S? jj5       5       r5\" 5       \" S7\+R`                  4S89SS9S:.S\\+   S\#S\S\ 4S@ jj5       5       r6\" 5       \" S7\,R`                  4S89SS9S:.S\\,   S\#S\S\ 4SA jj5       5       r7\" 5       \" S7\-R`                  4S89SS9S:.S\\-   S\#S\S\ 4SB jj5       5       r8\" 5       \" S7\.R`                  4S89SS9S:.S\\.   S\#S\S\ 4SC jj5       5       r9\" 5       \" S7\/R`                  4S89SS9S:.S\\/   S\#S\S\ 4SD jj5       5       r:g)Gé    )Úpartial)ÚAnyÚCallableÚOptionalÚUnionN)ÚTensoré   )ÚImageClassification)Ú_log_api_usage_onceé   )Úregister_modelÚWeightsÚWeightsEnum)Ú_IMAGENET_CATEGORIES)Ú_ovewrite_named_paramÚhandle_legacy_interface)ÚResNetÚResNet18_WeightsÚResNet34_WeightsÚResNet50_WeightsÚResNet101_WeightsÚResNet152_WeightsÚResNeXt50_32X4D_WeightsÚResNeXt101_32X8D_WeightsÚResNeXt101_64X4D_WeightsÚWide_ResNet50_2_WeightsÚWide_ResNet101_2_WeightsÚresnet18Úresnet34Úresnet50Ú	resnet101Ú	resnet152Úresnext50_32x4dÚresnext101_32x8dÚresnext101_64x4dÚwide_resnet50_2Úwide_resnet101_2Ú	in_planesÚ
out_planesÚstrideÚgroupsÚdilationÚreturnc                 ó8   • [         R                  " U USUUUSUS9$ )z3x3 convolution with paddingé   F)Úkernel_sizer*   Úpaddingr+   Úbiasr,   ©ÚnnÚConv2d)r(   r)   r*   r+   r,   s        ÚV/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torchvision/models/resnet.pyÚconv3x3r7   (   s+   € ä�9Š9ØØØØØØØØñ	ð 	ó    c                 ó0   • [         R                  " XSUSS9$ )z1x1 convolutionr   F)r0   r*   r2   r3   )r(   r)   r*   s      r6   Úconv1x1r:   6   s   € ä�9Š9�Y¸À&ÈuÑUÐUr8   c                   óÀ   ^ • \ rS rSr% Sr\\S'         SS\S\S\S\\R                     S	\S
\S\S\\
S\R                  4      SS4U 4S jjjrS\S\4S jrSrU =r$ )Ú
BasicBlocké;   r   Ú	expansionNÚinplanesÚplanesr*   Ú
downsampler+   Ú
base_widthr,   Ú
norm_layer.r-   c	                 óX  >• [         T	U ]  5         Uc  [        R                  nUS:w  d  US:w  a  [	        S5      eUS:”  a  [        S5      e[        XU5      U l        U" U5      U l        [        R                  " SS9U l
        [        X"5      U l        U" U5      U l        X@l        X0l        g )Nr   é@   z3BasicBlock only supports groups=1 and base_width=64z(Dilation > 1 not supported in BasicBlockT©Úinplace)ÚsuperÚ__init__r4   ÚBatchNorm2dÚ
ValueErrorÚNotImplementedErrorr7   Úconv1Úbn1ÚReLUÚreluÚconv2Úbn2rA   r*   )
Úselfr?   r@   r*   rA   r+   rB   r,   rC   Ú	__class__s
            €r6   rI   ÚBasicBlock.__init__>   s˜   ø€ ô 	‰ÑÔØÑÜŸ™ˆJØ�Q‹;˜*¨Ó*ÜÐRÓSÐSØ�a‹<Ü%Ð&PÓQÐQä˜X¨vÓ6ˆŒ
Ù˜fÓ%ˆŒÜ—G’G DÑ)ˆŒ	Ü˜VÓ,ˆŒ
Ù˜fÓ%ˆŒØ$ŒØ�r8   Úxc                 ó  • UnU R                  U5      nU R                  U5      nU R                  U5      nU R                  U5      nU R	                  U5      nU R
                  b  U R                  U5      nX2-  nU R                  U5      nU$ ©N)rM   rN   rP   rQ   rR   rA   ©rS   rV   ÚidentityÚouts       r6   ÚforwardÚBasicBlock.forwardY   sy   € Øˆà�j‰j˜‹mˆØ�h‰h�s‹mˆØ�i‰i˜‹nˆà�j‰j˜‹oˆØ�h‰h�s‹mˆà�?‰?Ñ&Ø—‘ qÓ)ˆHà‰ˆØ�i‰i˜‹nˆàˆ
r8   )rN   rR   rM   rQ   rA   rP   r*   ©r   Nr   rE   r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r>   ÚintÚ__annotations__r   r4   ÚModuler   rI   r   r\   Ú__static_attributes__Ú__classcell__©rT   s   @r6   r<   r<   ;   s¶   ø‡ Ø€IˆsÓð Ø*.ØØØØ9=ñàðð ðð ð	ð
 ˜RŸY™YÑ'ðð ðð ðð ðð ˜X c¨2¯9©9 nÑ5Ñ6ðð 
÷ð ð6˜ð  F÷ ò r8   r<   c                   óÀ   ^ • \ rS rSr% Sr\\S'         SS\S\S\S\\R                     S	\S
\S\S\\
S\R                  4      SS4U 4S jjjrS\S\4S jrSrU =r$ )Ú
Bottleneckél   é   r>   Nr?   r@   r*   rA   r+   rB   r,   rC   .r-   c	                 óœ  >• [         T
U ]  5         Uc  [        R                  n[	        X&S-  -  5      U-  n	[        X5      U l        U" U	5      U l        [        X™X5U5      U l	        U" U	5      U l
        [        X’U R                  -  5      U l        U" X R                  -  5      U l        [        R                  " SS9U l        X@l        X0l        g )Ng      P@TrF   )rH   rI   r4   rJ   rd   r:   rM   rN   r7   rQ   rR   r>   Úconv3Úbn3rO   rP   rA   r*   )rS   r?   r@   r*   rA   r+   rB   r,   rC   ÚwidthrT   s             €r6   rI   ÚBottleneck.__init__u   s¬   ø€ ô 	‰ÑÔØÑÜŸ™ˆJÜ�F¨4Ñ/Ñ0Ó1°FÑ:ˆä˜XÓ-ˆŒ
Ù˜eÓ$ˆŒÜ˜U¨6¸8ÓDˆŒ
Ù˜eÓ$ˆŒÜ˜U¨T¯^©^Ñ$;Ó<ˆŒ
Ù˜f§~¡~Ñ5Ó6ˆŒÜ—G’G DÑ)ˆŒ	Ø$ŒØ�r8   rV   c                 ó€  • UnU R                  U5      nU R                  U5      nU R                  U5      nU R                  U5      nU R	                  U5      nU R                  U5      nU R                  U5      nU R                  U5      nU R                  b  U R                  U5      nX2-  nU R                  U5      nU$ rX   )rM   rN   rP   rQ   rR   ro   rp   rA   rY   s       r6   r\   ÚBottleneck.forward�   s    € Øˆà�j‰j˜‹mˆØ�h‰h�s‹mˆØ�i‰i˜‹nˆà�j‰j˜‹oˆØ�h‰h�s‹mˆØ�i‰i˜‹nˆà�j‰j˜‹oˆØ�h‰h�s‹mˆà�?‰?Ñ&Ø—‘ qÓ)ˆHà‰ˆØ�i‰i˜‹nˆàˆ
r8   )	rN   rR   rp   rM   rQ   ro   rA   rP   r*   r^   r_   ri   s   @r6   rk   rk   l   s¸   ø‡ ð €IˆsÓð Ø*.ØØØØ9=ñàðð ðð ð	ð
 ˜RŸY™YÑ'ðð ðð ðð ðð ˜X c¨2¯9©9 nÑ5Ñ6ðð 
÷ð ð4˜ð  F÷ ò r8   rk   c                   ó  ^ • \ rS rSr      SS\\\\4      S\\	   S\	S\
S\	S\	S	\\\
      S
\\S\R                  4      SS4U 4S jjjr  SS\\\\4      S\	S\	S\	S\
S\R                   4S jjrS\S\4S jrS\S\4S jrSrU =r$ )r   é¦   NÚblockÚlayersÚnum_classesÚzero_init_residualr+   Úwidth_per_groupÚreplace_stride_with_dilationrC   .r-   c	           	      óÔ  >• [         T
U ]  5         [        U 5        Uc  [        R                  nX€l        SU l        SU l        Uc  / SQn[        U5      S:w  a  [        SU 35      eXPl
        X`l        [        R                  " SU R                  SSSSS	9U l        U" U R                  5      U l        [        R                  " S
S9U l        [        R"                  " SSSS9U l        U R'                  USUS   5      U l        U R'                  USUS   SUS   S9U l        U R'                  USUS   SUS   S9U l        U R'                  USUS   SUS   S9U l        [        R0                  " S5      U l        [        R4                  " SUR6                  -  U5      U l        U R;                  5        HÒ  n	[=        U	[        R                  5      (       a+  [        R>                  RA                  U	RB                  SSS9  MM  [=        U	[        R                  [        RD                  45      (       d  M~  [        R>                  RG                  U	RB                  S5        [        R>                  RG                  U	RH                  S5        MÔ     U(       aÞ  U R;                  5        HÉ  n	[=        U	[J        5      (       aM  U	RL                  RB                  b6  [        R>                  RG                  U	RL                  RB                  S5        Me  [=        U	[N        5      (       d  M|  U	RP                  RB                  c  M•  [        R>                  RG                  U	RP                  RB                  S5        MË     g g )NrE   r   )FFFr/   zFreplace_stride_with_dilation should be None or a 3-element tuple, got é   r	   F)r0   r*   r1   r2   TrF   )r0   r*   r1   r   é€   )r*   Údilateé   i   ©r   r   Úfan_outrP   )ÚmodeÚnonlinearity))rH   rI   r   r4   rJ   Ú_norm_layerr?   r,   ÚlenrK   r+   rB   r5   rM   rN   rO   rP   Ú	MaxPool2dÚmaxpoolÚ_make_layerÚlayer1Úlayer2Úlayer3Úlayer4ÚAdaptiveAvgPool2dÚavgpoolÚLinearr>   ÚfcÚmodulesÚ
isinstanceÚinitÚkaiming_normal_ÚweightÚ	GroupNormÚ	constant_r2   rk   rp   r<   rR   )rS   rw   rx   ry   rz   r+   r{   r|   rC   ÚmrT   s             €r6   rI   ÚResNet.__init__§   s£  ø€ ô 	‰ÑÔÜ˜DÔ!ØÑÜŸ™ˆJØ%ÔàˆŒØˆŒØ'Ñ/ò ,AÐ(ÜÐ+Ó,°Ó1Üð-Ø-IÐ,JðLóð ð ŒØ)ŒÜ—Y’Y˜q $§-¡-¸QÀqÐRSÐZ_Ñ`ˆŒ
Ù˜dŸm™mÓ,ˆŒÜ—G’G DÑ)ˆŒ	Ü—|’|°¸!ÀQÑGˆŒØ×&Ñ& u¨b°&¸±)Ó<ˆŒØ×&Ñ& u¨c°6¸!±9ÀQÐOkÐlmÑOnÐ&ÐoˆŒØ×&Ñ& u¨c°6¸!±9ÀQÐOkÐlmÑOnÐ&ÐoˆŒØ×&Ñ& u¨c°6¸!±9ÀQÐOkÐlmÑOnÐ&ÐoˆŒÜ×+Ò+¨FÓ3ˆŒÜ—)’)˜C %§/¡/Ñ1°;Ó?ˆŒà—‘–ˆAÜ˜!œRŸY™Y×'Ñ'Ü—‘×'Ñ'¨¯©°yÈvÐ'ÓVÜ˜A¤§¡´·±Ð=×>Ó>Ü—‘×!Ñ! !§(¡(¨AÔ.Ü—‘×!Ñ! !§&¡&¨!Ö,ñ  ö Ø—\‘\–^�Ü˜a¤×,Ñ,°·±·±Ñ1IÜ—G‘G×%Ñ% a§e¡e§l¡l°AÖ6Ü ¤:×.Ó.°1·5±5·<±<Ó3KÜ—G‘G×%Ñ% a§e¡e§l¡l°AÖ6ò	 $ð r8   r@   Úblocksr*   r€   c                 ó¶  • U R                   nS nU R                  nU(       a  U =R                  U-  sl        SnUS:w  d  U R                  X!R                  -  :w  aJ  [        R
                  " [        U R                  X!R                  -  U5      U" X!R                  -  5      5      n/ n	U	R                  U" U R                  X$XpR                  U R                  X†5      5        X!R                  -  U l        [        SU5       HE  n
U	R                  U" U R                  UU R                  U R                  U R                  US95        MG     [        R
                  " U	6 $ )Nr   )r+   rB   r,   rC   )r†   r,   r?   r>   r4   Ú
Sequentialr:   Úappendr+   rB   Úrange)rS   rw   r@   rœ   r*   r€   rC   rA   Úprevious_dilationrx   Ú_s              r6   rŠ   ÚResNet._make_layerá   s  € ð ×%Ñ%ˆ
Øˆ
Ø ŸM™MÐÞØ�MŠM˜VÑ#�MØˆFØ�Q‹;˜$Ÿ-™-¨6·O±OÑ+CÓCÜŸšÜ˜Ÿ™ v·±Ñ'?ÀÓHÙ˜6§O¡OÑ3Ó4óˆJð
 ˆØ�‰ÙØ—‘˜v¨z¿;¹;ÈÏÉÐYjóô	
ð
 §¡Ñ0ˆŒÜ�q˜&Ö!ˆAØ�M‰MÙØ—M‘MØØŸ;™;Ø#Ÿ™Ø!Ÿ]™]Ø)ñö	ñ "ô �}Š}˜fÐ%Ð%r8   rV   c                 óˆ  • U R                  U5      nU R                  U5      nU R                  U5      nU R                  U5      nU R	                  U5      nU R                  U5      nU R                  U5      nU R                  U5      nU R                  U5      n[        R                  " US5      nU R                  U5      nU$ )Nr   )rM   rN   rP   r‰   r‹   rŒ   r�   rŽ   r�   ÚtorchÚflattenr’   ©rS   rV   s     r6   Ú_forward_implÚResNet._forward_impl
  s™   € à�J‰J�q‹MˆØ�H‰H�Q‹KˆØ�I‰I�a‹LˆØ�L‰L˜‹Oˆà�K‰K˜‹NˆØ�K‰K˜‹NˆØ�K‰K˜‹NˆØ�K‰K˜‹Nˆà�L‰L˜‹OˆÜ�MŠM˜!˜QÓˆØ�G‰G�A‹Jˆàˆr8   c                 ó$   • U R                  U5      $ rX   )r¨   r§   s     r6   r\   ÚResNet.forward  s   € Ø×!Ñ! !Ó$Ð$r8   )r†   r�   rB   rN   rM   r,   r’   r+   r?   r‹   rŒ   r�   rŽ   r‰   rP   )iè  Fr   rE   NN)r   F)r`   ra   rb   rc   Útyper   r<   rk   Úlistrd   Úboolr   r   r4   rf   rI   rž   rŠ   r   r¨   r\   rg   rh   ri   s   @r6   r   r   ¦   s.  ø† ð
  Ø#(ØØ!Ø=AØ9=ñ87à�E˜* jÐ0Ñ1Ñ2ð87ð �S‘	ð87ð ð	87ð
 !ð87ð ð87ð ð87ð '/¨t°D©zÑ&:ð87ð ˜X c¨2¯9©9 nÑ5Ñ6ð87ð 
÷87ð 87ð~ Øñ'&à�E˜* jÐ0Ñ1Ñ2ð'&ð ð'&ð ð	'&ð
 ð'&ð ð'&ð 
�‰õ'&ðR˜vð ¨&ô ð$%˜ð % F÷ %ò %r8   r   rw   rx   ÚweightsÚprogressÚkwargsc                 ó®   • Ub#  [        US[        UR                  S   5      5        [        X40 UD6nUb  UR	                  UR                  USS95        U$ )Nry   Ú
categoriesT)r°   Ú
check_hash)r   r‡   Úmetar   Úload_state_dictÚget_state_dict)rw   rx   r¯   r°   r±   Úmodels         r6   Ú_resnetr¹      s]   € ð ÑÜ˜f m´S¸¿¹ÀlÑ9SÓ5TÔUä�5Ñ+ FÑ+€EàÑØ×Ñ˜g×4Ñ4¸hÐSWÐ4ÐXÔYà€Lr8   r‚   )Úmin_sizer³   c                   óR   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\r	Sr
g)r   i8  z9https://download.pytorch.org/models/resnet18-f37072fd.pthéà   ©Ú	crop_sizei(^² úLhttps://github.com/pytorch/vision/tree/main/references/classification#resnetúImageNet-1Kg�—nƒpQ@g¢E¶óýDV@©zacc@1zacc@5g /Ý$ý?gøSã¥›TF@úXThese weights reproduce closely the results of the paper using a simple training recipe.©Ú
num_paramsÚrecipeÚ_metricsÚ_opsÚ
_file_sizeÚ_docs©ÚurlÚ
transformsrµ   © N©r`   ra   rb   rc   r   r   r
   Ú_COMMON_METAÚIMAGENET1K_V1ÚDEFAULTrg   rÍ   r8   r6   r   r   8  óW   † ÙØGÙÐ.¸#Ñ>ð
Øð
à"ØdàØ#Ø#ñ ðð Ø Øsò
ñ€Mð$ ƒGr8   r   c                   óR   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\r	Sr
g)r   iN  z9https://download.pytorch.org/models/resnet34-b627a593.pthr¼   r½   i(›Lr¿   rÀ   gj¼t“TR@g{®GáÚV@rÁ   gZd;ßO@gš™™™™ÑT@rÂ   rÃ   rÊ   rÍ   NrÎ   rÍ   r8   r6   r   r   N  rÒ   r8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SSS90 \ESSSSSS
.0SSSS.ES9r	\	r
Srg)r   id  z9https://download.pytorch.org/models/resnet50-0676ba61.pthr¼   r½   i(ø…r¿   rÀ   g¸…ëQS@gºI+7W@rÁ   gB`åÐ"[@gD‹lçûqX@rÂ   rÃ   rÊ   z9https://download.pytorch.org/models/resnet50-11ad3fa6.pthéè   ©r¾   Úresize_sizezEhttps://github.com/pytorch/vision/issues/3995#issuecomment-1013906621gôýÔxé6T@g²�ï§ÆÛW@gÃõ(\�rX@úþ
                These weights improve upon the results of the original paper by using TorchVision's `new training recipe
                <https://pytorch.org/blog/how-to-train-state-of-the-art-models-using-torchvision-latest-primitives/>`_.
            rÍ   N©r`   ra   rb   rc   r   r   r
   rÏ   rÐ   ÚIMAGENET1K_V2rÑ   rg   rÍ   r8   r6   r   r   d  s«   † ÙØGÙÐ.¸#Ñ>ð
Øð
à"ØdàØ#Ø#ñ ðð Ø Øsò
ñ€Mñ$ ØGÙÐ.¸#È3ÑOð
Øð
à"Ø]àØ#Ø#ñ ðð Øðò
ñ€Mð* ƒGr8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SS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�  z:https://download.pytorch.org/models/resnet101-63fe2227.pthr¼   r½   i(Ä§r¿   rÀ   g-²�ïWS@gmçû©ñbW@rÁ   gNbX94@g1¬ZPe@rÂ   rÃ   rÊ   z:https://download.pytorch.org/models/resnet101-cd907fc2.pthrÕ   rÖ   ú8https://github.com/pytorch/vision/issues/3995#new-recipegbX9´xT@gR¸…ëñW@g)\�ÂõPe@rØ   rÍ   NrÙ   rÍ   r8   r6   r   r   �  s«   † ÙØHÙÐ.¸#Ñ>ð
Øð
à"ØdàØ#Ø#ñ ðð Ø!Øsò
ñ€Mñ$ ØHÙÐ.¸#È3ÑOð
Øð
à"ØPàØ#Ø#ñ ðð Ø ðò
ñ€Mð* ƒGr8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SS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º  z:https://download.pytorch.org/models/resnet152-394f9c45.pthr¼   r½   i(x–r¿   rÀ   g‡ÙÎ÷“S@gmçû©ñ‚W@rÁ   gºI+'@gÙÎ÷SãÍl@rÂ   rÃ   rÊ   z:https://download.pytorch.org/models/resnet152-f82ba261.pthrÕ   rÖ   rÜ   gV-’T@gã¥›Ä  X@gºI+Ïl@rØ   rÍ   NrÙ   rÍ   r8   r6   r   r   º  s«   † ÙØHÙÐ.¸#Ñ>ð
Øð
à"ØdàØ#Ø#ñ ðð Ø!Øsò
ñ€Mñ$ ØHÙÐ.¸#È3ÑOð
Øð
à"ØPàØ#Ø#ñ ðð Ø!ðò
ñ€Mð* ƒGr8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SS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å  z@https://download.pytorch.org/models/resnext50_32x4d-7cdf4587.pthr¼   r½   i(é}úMhttps://github.com/pytorch/vision/tree/main/references/classification#resnextrÀ   gd;ßO�gS@gé&1¬lW@rÁ   gìQ¸…ë@gÑ"Ûù~òW@rÂ   rÃ   rÊ   z@https://download.pytorch.org/models/resnext50_32x4d-1a0047aa.pthrÕ   rÖ   rÜ   gé&1¬LT@gö(\�ÂÕW@gZd;ßOõW@rØ   rÍ   NrÙ   rÍ   r8   r6   r   r   å  s«   † ÙØNÙÐ.¸#Ñ>ð
Øð
à"ØeàØ#Ø#ñ ðð Ø Øsò
ñ€Mñ$ ØNÙÐ.¸#È3ÑOð
Øð
à"ØPàØ#Ø#ñ ðð Ø ðò
ñ€Mð* ƒGr8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SS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  zAhttps://download.pytorch.org/models/resnext101_32x8d-8ba56ff5.pthr¼   r½   i(ÙJrß   rÀ   g‡ÙÎ÷ÓS@g‹lçû©¡W@rÁ   gD‹lçûi0@gL7‰A`9u@rÂ   rÃ   rÊ   zAhttps://download.pytorch.org/models/resnext101_32x8d-110c445d.pthrÕ   rÖ   úDhttps://github.com/pytorch/vision/issues/3995#new-recipe-with-fixresgL7‰A`µT@g;ßO�—X@gTã¥›Ä:u@rØ   rÍ   NrÙ   rÍ   r8   r6   r   r     s«   † ÙØOÙÐ.¸#Ñ>ð
Øð
à"ØeàØ#Ø#ñ ðð Ø!Øsò
ñ€Mñ$ ØOÙÐ.¸#È3ÑOð
Øð
à"Ø\àØ#Ø#ñ ðð Ø!ðò
ñ€Mð* ƒGr8   r   c                   óT   • \ rS rSr\" S\" \SS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;  zAhttps://download.pytorch.org/models/resnext101_64x4d-173b62eb.pthr¼   rÕ   rÖ   i(mùz+https://github.com/pytorch/vision/pull/5935rÀ   g9´Èv¾ÏT@g“VX@rÁ   gìQ¸…ë.@g+‡õs@zé
                These weights were trained from scratch by using TorchVision's `new training recipe
                <https://pytorch.org/blog/how-to-train-state-of-the-art-models-using-torchvision-latest-primitives/>`_.
            rÃ   rÊ   rÍ   NrÎ   rÍ   r8   r6   r   r   ;  s[   † ÙØOÙÐ.¸#È3ÑOð
Øð
à"ØCàØ#Ø#ñ ðð Ø!ðò
ñ€Mð* ƒGr8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SSS90 \ESSSSSS
.0SSSS.ES9r	\	r
Srg)r   iT  z@https://download.pytorch.org/models/wide_resnet50_2-95faca4d.pthr¼   r½   i(ú:https://github.com/pytorch/vision/pull/912#issue-445437439rÀ   gË¡E¶ó�S@g/Ý$�…W@rÁ   g²�ï§ÆË&@g
×£p=z`@rÂ   rÃ   rÊ   z@https://download.pytorch.org/models/wide_resnet50_2-9ba9bcbe.pthrÕ   rÖ   rá   gJ+‡fT@g�—nƒðW@gD‹lçûqp@rØ   rÍ   NrÙ   rÍ   r8   r6   r   r   T  s«   † ÙØNÙÐ.¸#Ñ>ð
Øð
à"ØRàØ#Ø#ñ ðð Ø Øsò
ñ€Mñ$ ØNÙÐ.¸#È3ÑOð
Øð
à"Ø\àØ#Ø#ñ ðð Ø!ðò
ñ€Mð* ƒGr8   r   c                   óŽ   • \ rS rSr\" S\" \SS90 \ESSSSS	S
.0SSSS.ES9r\" S\" \SS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  zAhttps://download.pytorch.org/models/wide_resnet101_2-32ee1156.pthr¼   r½   i(#�rä   rÀ   gƒÀÊ¡E¶S@gV-’W@rÁ   gTã¥›ÄÀ6@gé&1¬\n@rÂ   rÃ   rÊ   zAhttps://download.pytorch.org/models/wide_resnet101_2-d733dc28.pthrÕ   rÖ   rÜ   gq=
×£ T@gáz®GX@gË¡E¶óK~@rØ   rÍ   NrÙ   rÍ   r8   r6   r   r     s«   † ÙØOÙÐ.¸#Ñ>ð
Øð
à#ØRàØ#Ø#ñ ðð Ø!Øsò
ñ€Mñ$ ØOÙÐ.¸#È3ÑOð
Øð
à#ØPàØ#Ø#ñ ðð Ø!ðò
ñ€Mð* ƒGr8   r   Ú
pretrained)r¯   T)r¯   r°   c                 óT   • [         R                  U 5      n [        [        / SQX40 UD6$ )a4  ResNet-18 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__.

Args:
    weights (:class:`~torchvision.models.ResNet18_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNet18_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.

.. autoclass:: torchvision.models.ResNet18_Weights
    :members:
)r	   r	   r	   r	   )r   Úverifyr¹   r<   ©r¯   r°   r±   s      r6   r   r   ª  ó(   € ô* ×%Ñ% gÓ.€Gä”:š|¨WÑIÀ&ÑIÐIr8   c                 óT   • [         R                  U 5      n [        [        / SQX40 UD6$ )a4  ResNet-34 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__.

Args:
    weights (:class:`~torchvision.models.ResNet34_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNet34_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.

.. autoclass:: torchvision.models.ResNet34_Weights
    :members:
©r/   rm   é   r/   )r   rè   r¹   r<   ré   s      r6   r   r   Ä  rê   r8   c                 óT   • [         R                  U 5      n [        [        / SQX40 UD6$ )a  ResNet-50 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__.

.. note::
   The bottleneck of TorchVision places the stride for downsampling to the second 3x3
   convolution while the original paper places it to the first 1x1 convolution.
   This variant improves the accuracy and is known as `ResNet V1.5
   <https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch>`_.

Args:
    weights (:class:`~torchvision.models.ResNet50_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNet50_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.

.. autoclass:: torchvision.models.ResNet50_Weights
    :members:
rì   )r   rè   r¹   rk   ré   s      r6   r    r    Þ  s(   € ô6 ×%Ñ% gÓ.€Gä”:š|¨WÑIÀ&ÑIÐIr8   c                 óT   • [         R                  U 5      n [        [        / SQX40 UD6$ )aƒ  ResNet-101 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__.

.. note::
   The bottleneck of TorchVision places the stride for downsampling to the second 3x3
   convolution while the original paper places it to the first 1x1 convolution.
   This variant improves the accuracy and is known as `ResNet V1.5
   <https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch>`_.

Args:
    weights (:class:`~torchvision.models.ResNet101_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNet101_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.

.. autoclass:: torchvision.models.ResNet101_Weights
    :members:
©r/   rm   é   r/   )r   rè   r¹   rk   ré   s      r6   r!   r!   þ  ó(   € ô6  ×&Ñ& wÓ/€Gä”:š}¨gÑJÀ6ÑJÐJr8   c                 óT   • [         R                  U 5      n [        [        / SQX40 UD6$ )aƒ  ResNet-152 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__.

.. note::
   The bottleneck of TorchVision places the stride for downsampling to the second 3x3
   convolution while the original paper places it to the first 1x1 convolution.
   This variant improves the accuracy and is known as `ResNet V1.5
   <https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch>`_.

Args:
    weights (:class:`~torchvision.models.ResNet152_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNet152_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.

.. autoclass:: torchvision.models.ResNet152_Weights
    :members:
)r/   é   é$   r/   )r   rè   r¹   rk   ré   s      r6   r"   r"     rò   r8   c                 óˆ   • [         R                  U 5      n [        USS5        [        USS5        [        [        / SQX40 UD6$ )ac  ResNeXt-50 32x4d model from
`Aggregated Residual Transformation for Deep Neural Networks <https://arxiv.org/abs/1611.05431>`_.

Args:
    weights (:class:`~torchvision.models.ResNeXt50_32X4D_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNext50_32X4D_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.ResNeXt50_32X4D_Weights
    :members:
r+   é    r{   rm   rì   )r   rè   r   r¹   rk   ré   s      r6   r#   r#   >  sA   € ô. &×,Ñ,¨WÓ5€Gä˜& (¨BÔ/Ü˜&Ð"3°QÔ7Ü”:š|¨WÑIÀ&ÑIÐIr8   c                 óˆ   • [         R                  U 5      n [        USS5        [        USS5        [        [        / SQX40 UD6$ )ag  ResNeXt-101 32x8d model from
`Aggregated Residual Transformation for Deep Neural Networks <https://arxiv.org/abs/1611.05431>`_.

Args:
    weights (:class:`~torchvision.models.ResNeXt101_32X8D_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNeXt101_32X8D_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.ResNeXt101_32X8D_Weights
    :members:
r+   r÷   r{   rô   rð   )r   rè   r   r¹   rk   ré   s      r6   r$   r$   \  óA   € ô. '×-Ñ-¨gÓ6€Gä˜& (¨BÔ/Ü˜&Ð"3°QÔ7Ü”:š}¨gÑJÀ6ÑJÐJr8   c                 óˆ   • [         R                  U 5      n [        USS5        [        USS5        [        [        / SQX40 UD6$ )ag  ResNeXt-101 64x4d model from
`Aggregated Residual Transformation for Deep Neural Networks <https://arxiv.org/abs/1611.05431>`_.

Args:
    weights (:class:`~torchvision.models.ResNeXt101_64X4D_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.ResNeXt101_64X4D_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.ResNeXt101_64X4D_Weights
    :members:
r+   rE   r{   rm   rð   )r   rè   r   r¹   rk   ré   s      r6   r%   r%   z  rù   r8   c                 ón   • [         R                  U 5      n [        USS5        [        [        / SQX40 UD6$ )aU  Wide ResNet-50-2 model from
`Wide Residual Networks <https://arxiv.org/abs/1605.07146>`_.

The model is the same as ResNet except for the bottleneck number of channels
which is twice larger in every block. The number of channels in outer 1x1
convolutions is the same, e.g. last block in ResNet-50 has 2048-512-2048
channels, and in Wide ResNet-50-2 has 2048-1024-2048.

Args:
    weights (:class:`~torchvision.models.Wide_ResNet50_2_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.Wide_ResNet50_2_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.Wide_ResNet50_2_Weights
    :members:
r{   r   rì   )r   rè   r   r¹   rk   ré   s      r6   r&   r&   ˜  s5   € ô8 &×,Ñ,¨WÓ5€Gä˜&Ð"3°VÔ<Ü”:š|¨WÑIÀ&ÑIÐIr8   c                 ón   • [         R                  U 5      n [        USS5        [        [        / SQX40 UD6$ )a[  Wide ResNet-101-2 model from
`Wide Residual Networks <https://arxiv.org/abs/1605.07146>`_.

The model is the same as ResNet except for the bottleneck number of channels
which is twice larger in every block. The number of channels in outer 1x1
convolutions is the same, e.g. last block in ResNet-101 has 2048-512-2048
channels, and in Wide ResNet-101-2 has 2048-1024-2048.

Args:
    weights (:class:`~torchvision.models.Wide_ResNet101_2_Weights`, optional): The
        pretrained weights to use. See
        :class:`~torchvision.models.Wide_ResNet101_2_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.resnet.ResNet``
        base class. Please refer to the `source code
        <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
        for more details about this class.
.. autoclass:: torchvision.models.Wide_ResNet101_2_Weights
    :members:
r{   r   rð   )r   rè   r   r¹   rk   ré   s      r6   r'   r'   º  s5   € ô8 '×-Ñ-¨gÓ6€Gä˜&Ð"3°VÔ<Ü”:š}¨gÑJÀ6ÑJÐJr8   )r   r   r   )r   );Ú	functoolsr   Útypingr   r   r   r   r¥   Útorch.nnr4   r   Útransforms._presetsr
   Úutilsr   Ú_apir   r   r   Ú_metar   Ú_utilsr   r   Ú__all__rd   r5   r7   r:   rf   r<   rk   r   r¬   r­   r®   r¹   rÏ   r   r   r   r   r   r   r   r   r   r   rÐ   r   r   r    r!   r"   r#   r$   r%   r&   r'   rÍ   r8   r6   Ú<module>r     st  ðÝ ß 1Ó 1ã Ý Ý å 5Ý 'ß 6Ñ 6Ý 'ß Bò€ñ2�sð ¨ð °Sð Àcð ÐY\ð Ðeg×enÑenõ ñV�sð V¨ð V°Sð VÀÇÁõ Vô
.�—‘ô .ôb7�—‘ô 7ôtw%ˆR�Y‰Yô w%ðtØ��j *Ð,Ñ-Ñ.ðà�‰Iðð �kÑ"ðð ð	ð
 ðð ôð& Ø&ñ€ô�{ô ô,�{ô ô,(�{ô (ôV(˜ô (ôV(˜ô (ôV(˜kô (ôV(˜{ô (ôV˜{ô ô2(˜kô (ôV(˜{ô (ñV ÓÙ ,Ð0@×0NÑ0NÐ!OÑPØ6:ÈTò J˜Ð"2Ñ3ð JÀdð JÐ]`ð JÐekô Jó Qó ðJñ0 ÓÙ ,Ð0@×0NÑ0NÐ!OÑPØ6:ÈTò J˜Ð"2Ñ3ð JÀdð JÐ]`ð JÐekô Jó Qó ðJñ0 ÓÙ ,Ð0@×0NÑ0NÐ!OÑPØ6:ÈTò J˜Ð"2Ñ3ð JÀdð JÐ]`ð JÐekô Jó Qó ðJñ< ÓÙ ,Ð0A×0OÑ0OÐ!PÑQØ8<Ètò K˜(Ð#4Ñ5ð KÈð KÐ_bð KÐgmô Kó Ró ðKñ< ÓÙ ,Ð0A×0OÑ0OÐ!PÑQØ8<Ètò K˜(Ð#4Ñ5ð KÈð KÐ_bð KÐgmô Kó Ró ðKñ< ÓÙ ,Ð0G×0UÑ0UÐ!VÑWà48È4òJØÐ0Ñ1ðJØDHðJØ[^ðJàôJó Xó ðJñ8 ÓÙ ,Ð0H×0VÑ0VÐ!WÑXà59ÈDòKØÐ1Ñ2ðKØEIðKØ\_ðKàôKó Yó ðKñ8 ÓÙ ,Ð0H×0VÑ0VÐ!WÑXà59ÈDòKØÐ1Ñ2ðKØEIðKØ\_ðKàôKó Yó ðKñ8 ÓÙ ,Ð0G×0UÑ0UÐ!VÑWà48È4òJØÐ0Ñ1ðJØDHðJØ[^ðJàôJó Xó ðJñ@ ÓÙ ,Ð0H×0VÑ0VÐ!WÑXà59ÈDòKØÐ1Ñ2ðKØEIðKØ\_ðKàôKó Yó ñKr8   