
    fTh8                         S SK JrJrJr  SSKJr  SSKJr  SSKJ	r	  \(       a  SSK
Jr  \R                  " \5      r " S S	\5      rS	/rg
)    )TYPE_CHECKINGListOptional   )PretrainedConfig)logging   )CONFIG_MAPPING)SuperPointConfigc                      ^  \ rS rSrSrSr        SSSS\S\\\      S\\\	      S	\S
\S\
S\
4U 4S jjjrSrU =r$ )SuperGlueConfig   a  
This is the configuration class to store the configuration of a [`SuperGlueModel`]. It is used to instantiate a
SuperGlue model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the SuperGlue
[magic-leap-community/superglue_indoor](https://huggingface.co/magic-leap-community/superglue_indoor) architecture.

Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
documentation from [`PretrainedConfig`] for more information.

Args:
    keypoint_detector_config (`Union[AutoConfig, dict]`,  *optional*, defaults to `SuperPointConfig`):
        The config object or dictionary of the keypoint detector.
    hidden_size (`int`, *optional*, defaults to 256):
        The dimension of the descriptors.
    keypoint_encoder_sizes (`List[int]`, *optional*, defaults to `[32, 64, 128, 256]`):
        The sizes of the keypoint encoder layers.
    gnn_layers_types (`List[str]`, *optional*, defaults to `['self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross', 'self', 'cross']`):
        The types of the GNN layers. Must be either 'self' or 'cross'.
    num_attention_heads (`int`, *optional*, defaults to 4):
        The number of heads in the GNN layers.
    sinkhorn_iterations (`int`, *optional*, defaults to 100):
        The number of Sinkhorn iterations.
    matching_threshold (`float`, *optional*, defaults to 0.0):
        The matching threshold.
    initializer_range (`float`, *optional*, defaults to 0.02):
        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.

Examples:
    ```python
    >>> from transformers import SuperGlueConfig, SuperGlueModel

    >>> # Initializing a SuperGlue superglue style configuration
    >>> configuration = SuperGlueConfig()

    >>> # Initializing a model from the superglue style configuration
    >>> model = SuperGlueModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
	supergluekeypoint_detector_configr   hidden_sizekeypoint_encoder_sizesgnn_layers_typesnum_attention_headssinkhorn_iterationsmatching_thresholdinitializer_rangec	                   > Ub  UOSS/S-  U l         [        S U R                    5       5      (       d  [        S5      eX%-  S:w  a  [        S5      eUb  UO/ SQU l        X l        X0l        X@l         XPl        X`l        Xpl        [        U[        5      (       a"  S	U;   a  US	   OS
US	'   [        US	      " S0 UD6nUc  [        S
   " 5       nXl        Xl        SU l        SU l        [        T
U ]@  " S0 U	D6  g )Nselfcross	   c              3   *   #    U  H	  oS ;   v   M     g7f))r   r   N ).0
layer_types     m/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/superglue/configuration_superglue.py	<genexpr>+SuperGlueConfig.__init__.<locals>.<genexpr>V   s     [EZz!22EZs   z5All gnn_layers_types must be either 'self' or 'cross'r   z8hidden_size % num_attention_heads is different from zero)    @         
model_type
superpointFr   )r   all
ValueErrorr   r   r   r   r   
isinstancedictr
   r   r   attention_probs_dropout_prob
is_decodersuper__init__)r   r   r   r   r   r   r   r   r   kwargs	__class__s             r    r0   SuperGlueConfig.__init__H   s&    5E4P 0W]_fVgjkVk[TEZEZ[[[TUU,1WXX '=&H"N` 	# '&<# 0#6 #6 "4.55:FJb:b(6ht %\2 (66N|6\'] (*($ $+'5l'C'E$(@%!2,-)"6"    )
r-   r   r   r   r.   r   r   r   r   r   )Nr&   NN   d   g        g{Gz?)__name__
__module____qualname____firstlineno____doc__r'   intr   r   strfloatr0   __static_attributes____classcell__)r2   s   @r    r   r      s    (T J 8<6:04#$#&$'#'-#"4-# -# !)c 3	-#
 #49--# !-# !-# "-# !-# -#r4   r   N)typingr   r   r   configuration_utilsr   utilsr   autor
   r(   r   
get_loggerr7   loggerr   __all__r   r4   r    <module>rH      sH    1 0 3  ! -			H	%Z#& Z#z 
r4   