
    Z jj                     `    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_sizegh㈵>batch_norm_epsrope_parametersfine_matching_slice_dimg      $@!fine_matching_regress_temperatureg{Gz?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        ڐ/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/efficientloftr/configuration_efficientloftr.pyrA   "EfficientLoFTRConfig.__post_init__e   s   9=9N9N9Z 5 5`m151B1B1ND--T`151B1B1ND--Tf"#t'8'8"'=!= ILDL]L]_c_t_tHu#
Hu2D&VHsj1n--Hu#
 V__c_t_tUu)
Uu<QITy)*Z7Uu)
%
 #3t'<'<#=>(
>	 ##I./$2O2OPY2Z[^\^2__>(
$
 $(#;#;  $Xd.?.?%@ A#2 F!%!1!1A!513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)-d3i$&-%)L$s)d")%)L$s)d")K%%%&s&&'' !#!!"3" !#!  %(us{( ND #/S/). $.'*u*),,*+"C+c NE #'OTD['#$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   