ó
    qyüij  ã                   ó`   • S SK Jr  SSKJr  SSKJr  \" SS9\ " S S\5      5       5       rS/rg	)
é    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringzzju-community/efficientloftr)Ú
checkpointc                   ó¸  ^ • \ rS rSr% SrSrSr\\   S-  \	S'   Sr
\\   S-  \	S'   Sr\\   S-  \	S'   Sr\\	S	'   S
r\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S '   Sr\\	S!'   S"r\\	S#'   Sr \!S-  \	S$'   Sr"\\	S%'   S&r#\\	S''   S(r$\\	S)'   U 4S* jr%S+ r&S,r'U =r($ )-ÚEfficientLoFTRConfigé   a²	  
stage_num_blocks (`List`, *optional*, defaults to [1, 2, 4, 14]):
    The number of blocks in each stages
stage_stride (`List`, *optional*, defaults to [2, 1, 2, 2]):
    The stride used in each stage
q_aggregation_kernel_size (`int`, *optional*, defaults to 4):
    The kernel size of the aggregation of query states in the fusion network
kv_aggregation_kernel_size (`int`, *optional*, defaults to 4):
    The kernel size of the aggregation of key and value states in the fusion network
q_aggregation_stride (`int`, *optional*, defaults to 4):
    The stride of the aggregation of query states in the fusion network
kv_aggregation_stride (`int`, *optional*, defaults to 4):
    The stride of the aggregation of key and value states in the fusion network
num_attention_layers (`int`, *optional*, defaults to 4):
    Number of attention layers in the LocalFeatureTransformer
mlp_activation_function (`str`, *optional*, defaults to `"leaky_relu"`):
    Activation function used in the attention mlp layer.
coarse_matching_skip_softmax (`bool`, *optional*, defaults to `False`):
    Whether to skip softmax or not at the coarse matching step.
coarse_matching_threshold (`float`, *optional*, defaults to 0.2):
    The threshold for the minimum score required for a match.
coarse_matching_temperature (`float`, *optional*, defaults to 0.1):
    The temperature to apply to the coarse similarity matrix
coarse_matching_border_removal (`int`, *optional*, defaults to 2):
    The size of the border to remove during coarse matching
fine_kernel_size (`int`, *optional*, defaults to 8):
    Kernel size used for the fine feature matching
batch_norm_eps (`float`, *optional*, defaults to 1e-05):
    The epsilon used by the batch normalization layers
fine_matching_slice_dim (`int`, *optional*, defaults to 8):
    The size of the slice used to divide the fine features for the first and second fine matching stages.
fine_matching_regress_temperature (`float`, *optional*, defaults to 10.0):
    The temperature to apply to the fine similarity matrix

Examples:
    ```python
    >>> from transformers import EfficientLoFTRConfig, EfficientLoFTRForKeypointMatching

    >>> # Initializing a EfficientLoFTR configuration
    >>> configuration = EfficientLoFTRConfig()

    >>> # Initializing a model from the EfficientLoFTR configuration
    >>> model = EfficientLoFTRForKeypointMatching(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
ÚefficientloftrNÚstage_num_blocksÚout_featuresÚstage_strideé   Úhidden_sizeÚreluÚactivation_functioné   Úq_aggregation_kernel_sizeÚkv_aggregation_kernel_sizeÚq_aggregation_strideÚkv_aggregation_strideÚnum_attention_layersé   Únum_attention_headsg        Úattention_dropoutFÚattention_biasÚ
leaky_reluÚmlp_activation_functionÚcoarse_matching_skip_softmaxgš™™™™™É?Úcoarse_matching_thresholdgš™™™™™¹?Úcoarse_matching_temperatureé   Úcoarse_matching_border_removalÚfine_kernel_sizegñhãˆµøä>Úbatch_norm_epsÚrope_parametersÚfine_matching_slice_dimg      $@Ú!fine_matching_regress_temperatureg{®Gáz”?Úinitializer_rangec                 ó²  >• U R                   b  U R                   O/ SQU l         U R                  b  U R                  O/ SQU l        U R                  b  U R                  O/ SQU l        S/U R                  S S -   U l        [	        U R                  U R                   5       VVs/ s H  u  p#U/S/US-
  -  -   PM     snnU l        [        U R                   5       VVs/ s H  u  pCU R                  U   /U-  PM     snnU l        [        [        U R                   5      5       Vs/ s H&  nU R                  U   /U R                  U   S S -   PM(     snU l
        U R                  U l        [        [        U R                  5      5      S S U l        U R                   S-  U l        UR%                  SS5        [&        TU ]P  " S	0 UD6  g s  snnf s  snnf s  snf )
N)é   r"   r   é   )r"   r+   r"   r"   )é@   r-   é€   r   r+   éÿÿÿÿr"   Úpartial_rotary_factorg      @© )r   r   r   Ústage_in_channelsÚzipÚstage_block_strideÚ	enumerateÚstage_block_out_channelsÚrangeÚlenÚstage_block_in_channelsr   Únum_key_value_headsÚlistÚreversedÚfine_fusion_dimsr   Úintermediate_sizeÚ
setdefaultÚsuperÚ__post_init__)ÚselfÚkwargsÚstrideÚ
num_blocksÚ	stage_idxÚ	__class__s        €Ú|/home/mande/repo/quber/.venv/lib/python3.13/site-packages/transformers/models/efficientloftr/configuration_efficientloftr.pyrA   Ú"EfficientLoFTRConfig.__post_init__e   sÌ  ø€ à9=×9NÑ9NÑ9Z × 5Ò 5Ò`mˆÔØ15×1BÑ1BÑ1N˜D×-Ò-ÒT`ˆÔØ15×1BÑ1BÑ1N˜D×-Ò-ÒTfˆÔØ"#  t×'8Ñ'8¸¸"Ð'=Ñ!=ˆÔô ILÈD×L]ÑL]Ð_c×_tÑ_tÔHuô#
ÚHuÑ2D°&ˆVˆH˜�s˜j¨1™nÑ-Ô-ÑHuò#
ˆÔô V_Ð_c×_tÑ_tÔUuô)
ÚUuÑ<Q¸IˆT×Ñ˜yÑ)Ð*¨ZÔ7ÑUuò)
ˆÔ%ô
 #¤3 t×'<Ñ'<Ó#=Ô>ó(
â>�	ð ×#Ñ# IÑ.Ð/°$×2OÑ2OÐPYÑ2ZÐ[^Ð\^Ð2_Ô_Ù>ñ(
ˆÔ$ð
 $(×#;Ñ#;ˆÔ Ü $¤X¨d×.?Ñ.?Ó%@Ó AÀ#À2Ð FˆÔØ!%×!1Ñ!1°AÑ!5ˆÔØ×ÑÐ1°3Ô7Ü‰ÒÑ' Ó'ùó#
ùó)
ùò(
s   Â#GÃGÄ%-Gc                 óŽ   • U R                   U R                  S   :w  a(  [        SU R                    SU R                  S    35      eg)zOPart of `@strict`-powered validation. Validates the architecture of the config.r/   zMhidden_size should be equal to the last value in out_features. hidden_size = z, out_features = N)r   r   Ú
ValueError)rB   s    rH   Úvalidate_architectureÚ*EfficientLoFTRConfig.validate_architecture~   ss   € à×Ñ˜t×0Ñ0°Ñ4Ó4ÜØ_Ð`d×`pÑ`pÐ_qð  rCð  DH÷  DUñ  DUð  VXñ  DYð  CZð  [óð ð 5ó    )
r=   r>   r:   r   r9   r6   r4   r2   r   r   ))Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typer   r;   ÚintÚ__annotations__r   r   r   r   Ústrr   r   r   r   r   r   r   Úfloatr   Úboolr   r   r    r!   r#   r$   r%   r&   Údictr'   r(   r)   rA   rL   Ú__static_attributes__Ú__classcell__)rG   s   @rH   r	   r	      sD  ø‡ ñ/ðb "€Jà)-Ð�d˜3‘i $Ñ&Ó-Ø%)€L�$�s‘)˜dÑ"Ó)Ø%)€L�$�s‘)˜dÑ"Ó)Ø€K�ÓØ%Ð˜Ó%Ø%&Ð˜sÓ&Ø&'Ð Ó'Ø !Ð˜#Ó!Ø!"Ð˜3Ó"Ø !Ð˜#Ó!Ø Ð˜Ó Ø%(Ð�u˜s‘{Ó(Ø €N�DÓ Ø#/Ð˜SÓ/Ø).Ð  $Ó.Ø'*Ð˜uÓ*Ø),Ð Ó,Ø*+Ð" CÓ+ØÐ�cÓØ €N�EÓ Ø#'€O�T˜D‘[Ó'Ø#$Ð˜SÓ$Ø/3Ð% uÓ3Ø#Ð�uÓ#õ(÷2ð rN   r	   N)Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r1   rN   rH   Ú<module>ra      sH   ðõ  /å 3Ý #ñ Ð9Ñ:ØôkÐ+ó kó ó ;ðkð\ "Ð
"�rN   