+
    QV-j”B  ã                   óÐ   € R t ^ RIt^ RIt^ RIt^RIHtHt ^RIHt ]P                  ! ]
4      t ! R R]P                  4      t ! R R4      tR t ! R	 R
4      tRR R lltR tR# )zACollection of utils to be used by backbones and their components.N)Úhf_apiÚlogging)Úmaybe_install_capturing_hooksc                   ó   € ] tR t^tRtRtRtR# )ÚBackboneTypeÚtimmÚtransformers© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚTIMMÚTRANSFORMERSÚ__static_attributes__r	   ó    Úl/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/transformers/backbone_utils.pyr   r      s   † Ø€DØ!„Lr   r   c                   óÎ   a a€ ] tR t^!t oRtV3R lR ltR t]R 4       t]P                  V3R lR l4       t]R 4       t
]
P                  V3R	 lR
 l4       t
V 3R ltRtVtV ;t# )ÚBackboneConfigMixinzn
A Mixin to support handling the `out_features` and `out_indices` attributes for the backbone configurations.
c                óB   <€ V ^8„  d   QhRS[ R,          RS[ R,          /# )é   Úout_featuresNÚout_indices)Úlist)ÚformatÚ__classdict__s   "€r   Ú__annotate__Ú BackboneConfigMixin.__annotate__&   s'   ø€ ÷ "/ñ "/á˜T•kð"/ñ ˜D•[ñ"/r   c                ó*  € Wn         \        V\        4      '       d   \        V4      MTV n        V P                  4        V P                   V P                  r!Vf7   Vf3   \        V P                  4      ^,
          .pV P                  R,          .pM[Vf/   Ve+   V Uu. uF  q0P                  P                  V4      NK  	  ppM)Vf&   Ve"   V Uu. uF  q@P                  V,          NK  	  ppWuV n         V n        V P                  4        R# u upi u upi )a(  
Sets output indices and features to new values and aligns them with the given `stage_names`.
If one of the inputs is not given, find the corresponding `out_features` or `out_indices`
for the given `stage_names`.

Args:
    out_features (`list[str]`, *optional*):
        The names of the features for the backbone to output. Defaults to `config._out_features` if not provided.
    out_indices (`list[int]` or `tuple[int]`, *optional*):
        The indices of the features for the backbone to output. Defaults to `config._out_indices` if not provided.
Néÿÿÿÿ)	Ú_out_featuresÚ
isinstanceÚtupler   Ú_out_indicesÚverify_out_features_out_indicesÚlenÚstage_namesÚindex)Úselfr   r   ÚlayerÚidxs   &&&  r   Ú"set_output_features_output_indicesÚ6BackboneConfigMixin.set_output_features_output_indices&   s  € ð  *ÔÜ1;¸KÌ×1OÒ1OœD Ô-ÐU`ˆÔð 	×,Ñ,Ô.ð %)×$6Ñ$6¸×8IÑ8I�kØÒ <Ò#7Ü˜t×/Ñ/Ó0°1Õ4Ð5ˆKØ ×,Ñ,¨RÕ0Ð1‰LØÒ  \Ò%=ÙFRÓSÁl¸U×+Ñ+×1Ñ1°%Ö8ÁlˆKÐSˆKØÒ! kÒ&=Ù=HÓI¹[°c×,Ñ,¨S×1Ð1¹[ˆLÐIð 1=Ð-ˆÔ˜DÔ-Ø×,Ñ,Ö.ùò TùâIs   Â#DÃDc                óú  a € S P                   f   \        R4      hS P                  Eed   \        S P                  \        34      '       g"   \        R\        S P                  4       24      h\        ;QJ d)    V 3R lS P                   4       F  '       g   K   RM	  RM! V 3R lS P                   4       4      '       d&   \        RS P                    RS P                   24      h\        S P                  4      \        \        S P                  4      4      8w  d   \        R	S P                   24      hS P                  S P                    Uu. uF  qS P                  9   g   K  VNK  	  up;p8w  d   \        R
V RS P                   24      hS P                  Ee±   \        S P                  \        4      '       g"   \        R\        S P                  4       24      h\        ;QJ d!    . V 3R lS P                   4       F  NK  	  5M! V 3R lS P                   4       4      p\        ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      '       d&   \        RS P                    RS P                   24      h\        V4      \        \        V4      4      8w  d:   RS P                   2pYCS P                  8w  d   RV R2MR,          p\        V4      hV\        \        V4      4      8w  dQ   \        \        VS P                  4      R R7       UUu. uF  w  rVVNK	  	  ppp\        RV RS P                   24      hS P                  e’   S P                  e‚   \        S P                  4      \        S P                  4      8w  d   \        R4      hS P                  S P                   Uu. uF  pS P                   V,          NK  	  up8w  d   \        R4      hR# R# R# u upi u uppi u upi )zO
Verify that out_indices and out_features are valid for the given stage_names.
Nz2Stage_names must be set for transformers backbonesz out_features must be a list got c              3   ó@   <"  € T F  qSP                   9  x € K  	  R # 5i©N)r&   )Ú.0Úfeatr(   s   & €r   Ú	<genexpr>ÚFBackboneConfigMixin.verify_out_features_out_indices.<locals>.<genexpr>T   s   øé € ÐOÑ<N°D˜t×/Ñ/Ö/Ó<Nùs   ƒTFz.out_features must be a subset of stage_names: z got z2out_features must not contain any duplicates, got z@out_features must be in the same order as stage_names, expected z out_indices must be a list, got c              3   ól   <"  € T F)  q^ 8  d   V\        SP                  4      ,          MTx € K+  	  R# 5i)é    N)r%   r&   ©r0   r*   r(   s   & €r   r2   r3   e   s.   øé € Ð$rÑ`qÐY\È!ÄG S¬3¨t×/?Ñ/?Ó+@Ö%@ÐQTÔ%TÓ`qùs   ƒ14c              3   óp   <"  € T F+  q\        \        SP                  4      4      9  g   K'  Vx € K-  	  R # 5ir/   )Úranger%   r&   r6   s   & €r   r2   r3   f   s*   øé € Ð^Ñ"2˜3ÄÄsÈ4×K[ÑK[ÓG\ÓA]Ñ6]—3’3Ó"2ùs   ƒ$6¬
6z2out_indices must be valid indices for stage_names z, got z1out_indices must not contain any duplicates, got z(equivalent to z))Ú c                 ó   € V ^ ,          # )r5   r	   )Úxs   &r   Ú<lambda>ÚEBackboneConfigMixin.verify_out_features_out_indices.<locals>.<lambda>p   s   € ÐefÐghÖeir   )Úkeyz?out_indices must be in the same order as stage_names, expected zHout_features and out_indices should have the same length if both are setzQout_features and out_indices should correspond to the same stages if both are set)r&   Ú
ValueErrorr    r!   r   ÚtypeÚanyr%   Úsetr#   r"   ÚsortedÚzip)r(   r1   Úsorted_featsÚpositive_indicesÚmsgÚ_r*   Úsorted_negatives   f       r   r$   Ú3BackboneConfigMixin.verify_out_features_out_indicesJ   sˆ  ø€ ð ×ÑÒ#ÜÐQÓRÐRà×ÑÓ)Ü˜d×0Ñ0´4°'×:Ò:Ü Ð#CÄDÈ×I[ÑI[ÓD\ÐC]Ð!^Ó_Ð_ß‹sÔO¸D×<NÒ<NÓO�s�sŠsÔO¸D×<NÒ<NÓO×OÒOÜ ØDÀT×EUÑEUÐDVÐV[Ð\`×\nÑ\nÐ[oÐpóð ô �4×%Ñ%Ó&¬#¬c°$×2DÑ2DÓ.EÓ*FÔFÜ Ð#UÐVZ×VhÑVhÐUiÐ!jÓkÐkØ×!Ñ!Ø26×2BÒ2BÓ aÑ2B¨$Èd×N`ÑN`ÑF`§ Ñ2BÑ aÐa�ôô !ØVÐWcÐVdÐdiÐjn×j|Ñj|Ði}Ð~óð ð ×ÑÓ(Ü˜d×/Ñ/´×6Ò6Ü Ð#CÄDÈ×IZÑIZÓD[ÐC\Ð!]Ó^Ð^ç$œuÔ$rÐ`d×`qÒ`qÓ$rŸu™uÔ$rÐ`d×`qÒ`qÓ$rÓrÐß‹sÔ^Ñ"2Ó^�s�sŠsÔ^Ñ"2Ó^×^Ò^Ü ØHÈ×IYÑIYÐHZÐZ`Ðae×arÑarÐ`sÐtóð ô Ð#Ó$¬¬CÐ0@Ó,AÓ(BÔBØIÈ$×J[ÑJ[ÐI\Ð]�ØÐUY×UfÑUfÔAf˜Ð)9Ð(:¸"Ñ=ÐlnÕn�Ü  “oÐ%Ø¤5¬Ð0@Ó)AÓ#BÔBä&,¬SÐ1AÀ4×CTÑCTÓ-UÑ[iÕ&jô#Ù&j™F˜A“CÑ&jð  ñ #ô !ØUÐVeÐUfÐfkÐlp×l}Ñl}Ðk~Ðóð ð ×ÑÒ)¨d×.?Ñ.?Ò.KÜ�4×%Ñ%Ó&¬#¨d×.?Ñ.?Ó*@Ô@Ü Ð!kÓlÐlØ×!Ñ!Àt×GXÒGXÓ%YÑGXÀ d×&6Ñ&6°s×&;Ð&;ÑGXÑ%YÔYÜ Ð!tÓuÐuñ Zñ /LÑ)ùò7 !bùó(#ùò &Zs   ÅO-Å#O-Ì!O2Î9O8c                ó   € V P                   # r/   )r    ©r(   s   &r   r   Ú BackboneConfigMixin.out_features|   s   € à×!Ñ!Ð!r   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# ©r   r   ©r   Ústr)r   r   s   "€r   r   r   �   s   ø€ ÷ ]ñ ]©©c­ñ ]r   c                ó,   € V P                  VRR7       R# )úp
Set the out_features attribute. This will also update the out_indices attribute to match the new out_features.
N©r   r   )r+   ©r(   r   s   &&r   r   rM   €   s   € ð
 	×/Ñ/¸\ÐW[Ð/Ö\r   c                ó   € V P                   # r/   )r#   rL   s   &r   r   ÚBackboneConfigMixin.out_indices‡   s   € à× Ñ Ð r   c                óT   <€ V ^8„  d   QhRS[ S[R3,          S[S[,          ,          /# )r   r   .©r"   Úintr   )r   r   s   "€r   r   r   Œ   s(   ø€ ÷ \ñ \¡u©S°#¨X¥¹¹c½Õ'Bñ \r   c                óN   € Ve   \        V4      MTpV P                  RVR7       R# )úo
Set the out_indices attribute. This will also update the out_features attribute to match the new out_indices.
NrT   )r   r+   ©r(   r   s   &&r   r   rW   ‹   s(   € ð
 ,7Ò+B”d˜;Ô'ÈˆØ×/Ñ/¸TÈ{Ð/Ö[r   c                óx   <€ \         SV `  4       pVP                  RR4      VR&   VP                  RR4      VR&   V# )z§
Serializes this instance to a Python dictionary. Override the default `to_dict()` from `PreTrainedConfig` to
include the `out_features` and `out_indices` attributes.
r    Nr   r#   r   )ÚsuperÚto_dictÚpop)r(   ÚoutputÚ	__class__s   & €r   r`   ÚBackboneConfigMixin.to_dict“   s@   ø€ ô
 ‘‘Ó"ˆØ!'§¡¨O¸TÓ!Bˆˆ~ÑØ &§
¡
¨>¸4Ó @ˆˆ}ÑØˆr   )r    r#   )r
   r   r   r   Ú__doc__r+   r$   Úpropertyr   Úsetterr   r`   r   Ú__classdictcell__Ú__classcell__©rc   r   s   @@r   r   r   !   s†   ù‡ € ñ÷"/ð "/òH0vðd ñ"ó ð"ð ×Ñ÷]ó ð]ð ñ!ó ð!ð ×Ñ÷\ó ð\÷õ r   r   c                óF   a € \         P                  ! S 4      V 3R l4       pV# )a£  
Wrapper for backbone forwards. Backbones always compute `hidden_states` to build their feature maps, so
this forces `output_hidden_states=True` on the wrapped forward and then removes `hidden_states` from the
returned object unless the caller explicitly requested them.

NOTE: We assume a `can_return_tuple` decorator to be applied before so that we always expect a dict like
      object to remove the hidden states.
c                 ó  <€ VP                  R \        V P                  R R4      4      pRVR &   S! V .VO5/ VB pV'       g>   VP                  4        UUu/ uF  w  rVVR8w  g   K  WVbK  	  ppp\	        V4      ! R/ VB pV# u uppi )Úoutput_hidden_statesFTÚhidden_statesr	   )ÚgetÚgetattrÚconfigÚitemsr@   )	r(   ÚargsÚkwargsrm   rb   ÚkÚvÚfiltered_output_dataÚforward_functions	   &*,     €r   ÚwrapperÚ,filter_output_hidden_states.<locals>.wrapper¨   s‹   ø€ à%Ÿz™zÐ*@Ä'È$Ï+É+ÐWmÐotÓBuÓvÐØ)-ˆÐ%Ñ&Ù! $Ð8¨Ò8°Ñ8ˆß#Ø5;·\±\´^Ô#\±^©T¨QÀqÈOÑG[¤D A¢D±^Ð Ñ#\Ü˜&”\Ñ9Ð$8Ñ9ˆFØˆùó $]s   ÁBÁ%B)Ú	functoolsÚwraps)rx   ry   s   f r   Úfilter_output_hidden_statesr}   ž   s(   ø€ ô ‡_‚_Ð%Ó&ôó 'ðð €Nr   c                   ó>  a a€ ] tR t^µt oRtRtV3R lV 3R lltV 3R ltV3R lR ltV3R lR	 lt	]
R
 4       t]P                  V3R lR l4       t]
R 4       t]P                  V3R lR l4       t]
R 4       t]
R 4       tR tRV3R lR lltV3R ltRtVtV ;t# )ÚBackboneMixinNTc                ó   <€ V ^8„  d   QhRR/# ©r   ÚreturnNr	   )r   r   s   "€r   r   ÚBackboneMixin.__annotate__¼   s   ø€ ÷ Sñ S¨4ñ Sr   c                ó   <€ \         SV `  ! V/ VB  VP                  RR4      pVe   \        P                  V n        M\        P                  V n        V P
                  \        P                  8X  d   V P                  VR7       R# V P
                  \        P                  8X  d   V P                  4        R# \        RV P
                   R24      h)z”
Method to initialize the backbone. This method is called by the constructor of the base class after the
pretrained model weights have been loaded.
Útimm_backboneN)Úbackbonezbackbone_type z not supported.)
r_   Ú__init__ra   r   r   Úbackbone_typer   Ú_init_timm_backboneÚ_init_transformers_backboner?   )r(   rs   rt   r…   rc   s   &*, €r   r‡   ÚBackboneMixin.__init__¼   s©   ø€ ô
 	‰Ò˜$Ð) &Ò)ØŸ
™
 ?°DÓ9ˆØÒ$Ü!-×!2Ñ!2ˆDÕä!-×!:Ñ!:ˆDÔà×Ñ¤×!2Ñ!2Ô2Ø×$Ñ$¨mÐ$Ö<Ø×Ñ¤<×#<Ñ#<Ô<Ø×,Ñ,Ö.ä˜~¨d×.@Ñ.@Ð-AÀÐQÓRÐRr   c                ó:   <€ \         SV `  4        \        V 4       R# )am  
Override `post_init` to always install capturing hooks, as backbone will ALWAYS capture outputs. We need to do
it in `post_init`, as modules need to be already instantiated.
It avoids some mixups with `torch.compile`, as the first hook installation will need/create a graph break,
which can clash with external user call such as `model = torch.compile(model...)`.
N)r_   Ú	post_initr   )r(   rc   s   &€r   r�   ÚBackboneMixin.post_initÏ   s   ø€ ô 	‰ÑÔÜ% dÖ+r   c                ó   <€ V ^8„  d   QhRR/# r�   r	   )r   r   s   "€r   r   rƒ   Û   s   ø€ ÷ Rñ R¨tñ Rr   c                ó�  € \        V P                  RR4      p\        V P                  RR4      pVP                  P                   Uu. uF  qDR,          NK  	  upV n        VP                  P                   Uu. uF  qDR,          NK  	  upV n        \        VP                  P                  4      pVP                  P                  4       pVe   W&8w  d   \        RV R24      hVe    W0P                  8w  d   \        RV R	24      hV P                  V P                  n        V P                  P                  We4       R# u upi u upi )
zZ
Initialize the backbone model from timm. The backbone must already be loaded to backbone
r   Nr&   ÚmoduleÚnum_chsz!Config has `out_features` set to z‰ which doesn't match `out_features` from backbone's feature_info. Please check if your checkpoint has correct out features/indices saved.z Config has `stage_names` set to z� which doesn't match `stage_names` from backbone's feature_info. Please check if your checkpoint has correct `stage_names` saved.)rp   rq   Úfeature_infoÚinfor&   Únum_featuresr   r   Úmodule_namer?   r+   )r(   r†   Úout_features_from_configÚstage_names_from_configÚstager   r   s   &&     r   r‰   Ú!BackboneMixin._init_timm_backboneÛ   s@  € ô
 $+¨4¯;©;¸ÈÓ#MÐ Ü")¨$¯+©+°}ÀdÓ"KÐð
 :B×9NÑ9N×9SÒ9SÓTÑ9S° (ŸO˜OÑ9SÑTˆÔØ;C×;PÑ;P×;UÒ;UÓVÑ;U°% 9×-Ð-Ñ;UÑVˆÔä˜8×0Ñ0×<Ñ<Ó=ˆØ×,Ñ,×8Ñ8Ó:ˆà#Ò/Ð4LÔ4\ÜØ3Ð4LÐ3Mð Nxð xóð ð
 #Ò.Ð3J×N^ÑN^Ô3^ÜØ2Ð3JÐ2Kð Lqð qóð ð #'×"2Ñ"2ˆ�‰ÔØ�‰×6Ñ6°|ÖQùò) UùÚVs   ÁD>Á8Ec                ó   <€ V ^8„  d   QhRR/# r�   r	   )r   r   s   "€r   r   rƒ   ü   s   ø€ ÷ !ñ !¨Tñ !r   c                ó~   € V P                   P                  V n        V P                   P                  4        R V n        R # r/   )rq   r&   r$   r•   rL   s   &r   rŠ   Ú)BackboneMixin._init_transformers_backboneü   s,   € ØŸ;™;×2Ñ2ˆÔØ�‰×3Ñ3Ô5à ˆÖr   c                ó.   € V P                   P                  # r/   )rq   r    rL   s   &r   r   ÚBackboneMixin.out_features  s   € à�{‰{×(Ñ(Ð(r   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# rO   rP   )r   r   s   "€r   r   rƒ     s   ø€ ÷ 0ñ 0©©c­ñ 0r   c                ó&   € WP                   n        R# )rS   N)rq   r   rU   s   &&r   r   rŸ     s   € ð
 $0�‰Ö r   c                ó.   € V P                   P                  # r/   )rq   r#   rL   s   &r   r   ÚBackboneMixin.out_indices  s   € à�{‰{×'Ñ'Ð'r   c                óP   <€ V ^8„  d   QhRS[ S[,          S[S[,          ,          /# )r   r   rY   )r   r   s   "€r   r   rƒ     s!   ø€ ÷ .ñ .¡u©S¥z±D¹µIÕ'=ñ .r   c                ó&   € WP                   n        R# )r\   N)rq   r   r]   s   &&r   r   r£     s   € ð
 #.�‰Ör   c                ó‚   € \        V P                  4       UUu/ uF  w  rW P                  V,          bK  	  upp# u uppi r/   )Ú	enumerater&   r•   )r(   Úir™   s   &  r   Úout_feature_channelsÚ"BackboneMixin.out_feature_channels  s:   € ô =FÀd×FVÑFVÔ<WÔXÑ<W±°�×(Ñ(¨Õ+Ò+Ñ<WÒXÐXùÓXs   ™;c                ód   € V P                    Uu. uF  qP                  V,          NK  	  up# u upi r/   )r   r©   )r(   Únames   & r   ÚchannelsÚBackboneMixin.channels  s.   € à<@×<MÒ<MÓNÑ<M°D×)Ñ)¨$×/Ð/Ñ<MÑNÐNùÒNs   �-c                ó`  € V P                   '       g   VP                  R R4       V P                  \        P                  8X  d_   \        \        P                  ! V P                  4      P                  4      pVP                  4        UUu/ uF  w  rEWC9   g   K  WEbK  	  pppV ! V/ VB # u uppi )Úoutput_attentionsN)Úhas_attentionsra   rˆ   r   r   ÚdictÚinspectÚ	signatureÚforwardÚ
parametersrr   )r(   rs   rt   r´   ru   rv   s   &*,   r   Úforward_with_filtered_kwargsÚ*BackboneMixin.forward_with_filtered_kwargs"  sŠ   € Ø×"×"Ð"Ø�J‰JÐ*¨DÔ1Ø×Ñ¤×!2Ñ!2Ô2ÜœW×.Ò.¨t¯|©|Ó<×GÑGÓHˆIØ'-§|¡|¤~ÔH¡~™t˜q¸¹”d�a’d¡~ˆFÑHÙ�TÐ$˜VÑ$Ð$ùó Is   Â

B*ÂB*c                óV   <€ V ^8„  d   QhRS[ R,          RS[ R,          RS[ R,          /# )r   rm   Nr°   Úreturn_dict)Úbool)r   r   s   "€r   r   rƒ   *  s<   ø€ ÷ ]ñ ]ñ # T�kð]ñ   $�;ð	]ñ
 ˜D•[ñ]r   c                ó   € \        R 4      h)z7This method should be implemented by the derived class.)ÚNotImplementedError)r(   Úpixel_valuesrm   r°   rº   s   &&&&&r   rµ   ÚBackboneMixin.forward*  s   € ô "Ð"[Ó\Ð\r   c                ó@   <€ V ^8„  d   Qh/ S[ R,          ;R&   S[;R&   # )r   Nrˆ   r±   )r   r»   )r   r   s   "€r   r   rƒ   µ   s"   ø‡ ‚ Ù $Õ&Ñ-ñ ñ
 Ñò r   )rˆ   r•   r&   )NNN)r
   r   r   r   rˆ   r±   r‡   r�   r‰   rŠ   rf   r   rg   r   r©   r­   r·   rµ   Ú__annotate_func__r   rh   ri   rj   s   @@r   r   r   µ   sÚ   ù‡ € Ø)-€Mð  €N÷Só Sõ&
,÷Rð R÷B!ð !ð ñ)ó ð)ð ×Ñ÷0ó ð0ð ñ(ó ð(ð ×Ñ÷.ó ð.ð ñYó ðYð
 ñOó ðOò%÷]ò ]÷k … r   r   c          	      ó€   € V ^8„  d   QhR\         R,          R\         R,          R\        R,          R\        R,          /# )r   Údefault_backboneNÚdefault_config_typeÚdefault_config_kwargsÚtimm_default_kwargs)rQ   r²   )r   s   "r   r   r   4  sB   € ÷ /#ñ /#ä˜D•jð/#ô ˜t�ð/#ô   $�;ð	/#ô
  �ñ/#r   c                 ó(  € ^RI Hp ^RIHp VP	                  RR4      pVP	                  R/ 4      p	VP                  R4      e   VP	                  R4      MTp
VP	                  RR4       Ve-   V'       d%   V
e!   V f   V	'       g   VR	,          ! RRV
/VB p W3# V
ew   V fs   \        4       P                  V
4      '       d?   VP                  V
4      w  r¼W{R
,          ,          pVP                  V	4       V! R/ VB p W3# VR	,          ! RRV
/V	B p  W3# V f;   Ve7   \        P                  RV R24       T;'       g    / pWr,          ! R/ VB p W3# \        V \        4      '       d+   V P                  R
4      pW~,          pVP                  V 4      p W3# )é   )ÚPreTrainedConfig)ÚCONFIG_MAPPINGÚuse_timm_backboneTÚbackbone_kwargsr†   NÚuse_pretrained_backboner…   Ú
model_typezG`backbone_config` is `None`. Initializing the config with the default `z` vision config.r	   )Úconfiguration_utilsrÉ   Úmodels.autorÊ   ra   ro   r   Úrepo_existsÚget_config_dictÚupdateÚloggerr”   r!   r²   Ú	from_dict)Úbackbone_configrÃ   rÄ   rÅ   rÆ   rt   rÉ   rÊ   rË   rÌ   r†   Úconfig_dictrH   Úconfig_classÚbackbone_model_types   &&&&&,         r   Ú%consolidate_backbone_kwargs_to_configrÚ   4  s¸  € õ 6Ý+àŸ
™
Ð#6¸Ó=ÐØ—j‘jÐ!2°BÓ7€OØ)/¯©°JÓ)?Ò)Kˆv�z‰z˜*Ô%ÐQa€HØ
‡J�JÐ(¨$Ô/ð
 	Ò'ßØÒ ØÒ#ßà(¨Ö9ÑcÀ8ÐcÐObÑcˆð( Ð"Ð"ð' 
Ò	 /Ò"9Ü‹8×Ñ ×)Ò)Ø-×=Ñ=¸hÓG‰NˆKØ)°lÕ*CÕDˆLØ×Ñ˜Ô/Ù*Ñ9¨[Ñ9ˆOð Ð"Ð"ð -¨_Ö=ÑcÀxÐcÐSbÑc‰Oð Ð"Ð"ð 
Ò	 Ð%8Ò%DÜ�‰ØUÐViÐUjÐjzÐ{ô	
ð !6× ;Ð ;¸ÐØ(Ö=ÑVÐ@UÑVˆð Ð"Ð"ô 
�O¤T×	*Ò	*Ø-×1Ñ1°,Ó?ÐØ%Õ:ˆØ&×0Ñ0°ÓAˆàÐ"Ð"r   c                ó€   € ^ RI Hp \        V RR4      pVf   VP                  V R7      pV# VP                  VR7      pV# )a&  
Loads the backbone model from a config object.

If the config is from the backbone model itself, then we return a backbone model with randomly initialized
weights.

If the config is from the parent model of the backbone model itself, then we load the pretrained backbone weights
if specified.
)ÚAutoBackbonerÖ   N)rq   )r   rÜ   rp   Úfrom_config)rq   rÜ   rÖ   r†   s   &   r   Úload_backbonerÞ   f  sP   € õ *ä˜fÐ&7¸Ó>€OàÒØ×+Ñ+°6Ð+Ó:ˆð €Oð  ×+Ñ+°?Ð+ÓCˆØ€Or   )NNNN)re   Úenumr{   r³   Úutilsr   r   Úutils.output_capturingr   Ú
get_loggerr
   rÔ   ÚEnumr   r   r}   r   rÚ   rÞ   r	   r   r   Ú<module>rä      sh   ðñ Hã Û Û ç "Ý Að 
×	Ò	˜HÓ	%€ô"�4—9‘9ô "÷
zñ zòz÷.|]ñ |]÷~/#ôdr   