Ë
    ÛÓ^jÔ  ã                   ó‚   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
  ed	¬
«      e G d„ de«      «       «       ZdgZy)zDETR model configurationé    )Ústricté   )Ú%consolidate_backbone_kwargs_to_config)ÚPreTrainedConfig)Úauto_docstringé   )Ú
AutoConfigzfacebook/detr-resnet-50)Ú
checkpointc                   ó  ‡ — e Zd ZU dZdZdeiZdgZddddœZd	Z	e
ez  d	z  ed<   d
Zeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeez  ed<   dZeez  ed<   dZeed<   dZeed<   dZeed<   dZeez  ed<   dZeez  ed<   dZ eez  ed <   d!Z!eed"<   d#Z"eed$<   d%Z#eed&<   d'Z$eed(<   d%Z%eed)<   d*Z&eed+<   d,Z'eed-<   d.Z(eed/<   d*Z)eed0<   d*Z*eed1<   d,Z+eed2<   d.Z,eed3<   dZ-eed4<   ˆ fd5„Z.ˆ xZ/S )6Ú
DetrConfiga'  
    num_queries (`int`, *optional*, defaults to 100):
        Number of object queries, i.e. detection slots. This is the maximal number of objects
        [`ConditionalDetrModel`] can detect in a single image. For COCO, we recommend 100 queries.
    position_embedding_type (`str`, *optional*, defaults to `"sine"`):
        Type of position embeddings to be used on top of the image features. One of `"sine"` or `"learned"`.
    dilation (`bool`, *optional*, defaults to `False`):
        Whether to replace stride with dilation in the last convolutional block (DC5). Only supported when
        `use_timm_backbone` = `True`.

    Examples:

    ```python
    >>> from transformers import DetrConfig, DetrModel

    >>> # Initializing a DETR facebook/detr-resnet-50 style configuration
    >>> configuration = DetrConfig()

    >>> # Initializing a model (with random weights) from the facebook/detr-resnet-50 style configuration
    >>> model = DetrModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚdetrÚbackbone_configÚpast_key_valuesÚd_modelÚencoder_attention_headsÚencoder_layers)Úhidden_sizeÚnum_attention_headsÚnum_hidden_layersNr   Únum_channelséd   Únum_queriesé   i   Úencoder_ffn_dimé   Údecoder_layersÚdecoder_ffn_dimÚdecoder_attention_headsg        Úencoder_layerdropÚdecoder_layerdropTÚis_encoder_decoderÚreluÚactivation_functioné   gš™™™™™¹?ÚdropoutÚattention_dropoutÚactivation_dropoutg{®Gáz”?Úinit_stdg      ð?Úinit_xavier_stdFÚauxiliary_lossÚsineÚposition_embedding_typeÚdilationé   Ú
class_costé   Ú	bbox_costr   Ú	giou_costÚmask_loss_coefficientÚdice_loss_coefficientÚbbox_loss_coefficientÚgiou_loss_coefficientÚeos_coefficientc           	      ó<  •— |j                  di «      }|j                  d| j                  «      dd|j                  dg d¢«      dœ}| j                  r|j                  dd	«      |d<   t        d| j                  d
dddgi|dœ|¤Ž\  | _        }t        ‰| �  di |¤Ž y )NÚbackbone_kwargsr   TFÚout_indices)r.   r   r   é   )r   Úfeatures_onlyÚuse_pretrained_backboner:   Úoutput_strideé   Úresnet50ÚresnetÚout_featuresÚstage4)r   Údefault_backboneÚdefault_config_typeÚdefault_config_kwargsÚtimm_default_kwargs© )Úgetr   r-   r   r   ÚsuperÚ__post_init__)ÚselfÚkwargsr9   rG   Ú	__class__s       €úv/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/detr/configuration_detr.pyrK   zDetrConfig.__post_init__\   s¹   ø€ Ø Ÿ*™*Ð%6¸Ó;ˆà+×/Ñ/°À×@QÑ@QÓRØ!Ø',Ø*×.Ñ.¨}ºlÓKñ	
Ðð �=Š=Ø3B×3FÑ3FÀÐXZÓ3[Ð Ñ0ä'Lð (
Ø ×0Ñ0Ø'Ø (Ø#1°H°:Ð">Ø 3ñ(
ð ñ(
Ñ$ˆÔ˜fô 	‰ÑÑ' Ó'ó    )0Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer	   Úsub_configsÚkeys_to_ignore_at_inferenceÚattribute_mapr   Údictr   Ú__annotations__r   Úintr   r   r   r   r   r   r   r   Úfloatr    r!   Úboolr#   Ústrr   r%   r&   r'   r(   r)   r*   r,   r-   r/   r1   r2   r3   r4   r5   r6   r7   rK   Ú__classcell__)rN   s   @rO   r   r      s–  ø… ñð2 €JØ$ jÐ1€KØ#4Ð"5Ðà Ø8Ø-ñ€Mð 7;€O�TÐ,Ñ,¨tÑ3Ó:Ø€L�#ÓØ€K�ÓØ€N�CÓØ€O�SÓØ#$Ð˜SÓ$Ø€N�CÓØ€O�SÓØ#$Ð˜SÓ$Ø%(Ð�u˜s‘{Ó(Ø%(Ð�u˜s‘{Ó(Ø#Ð˜Ó#Ø%Ð˜Ó%Ø€GˆSÓØ€GˆU�S‰[ÓØ%(Ð�u˜s‘{Ó(Ø&)Ð˜ ™Ó)Ø€HˆeÓØ €O�UÓ Ø €N�DÓ Ø#)Ð˜SÓ)Ø€HˆdÓØ€J�ÓØ€IˆsÓØ€IˆsÓØ!"Ð˜3Ó"Ø!"Ð˜3Ó"Ø!"Ð˜3Ó"Ø!"Ð˜3Ó"Ø €O�UÓ ÷(ð (rP   r   N)rT   Úhuggingface_hub.dataclassesr   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   Úautor	   r   Ú__all__rH   rP   rO   ú<module>rf      sP   ðñ å .å CÝ 3Ý #Ý ñ Ð4Ô5ØôU(Ð!ó U(ó ó 6ðU(ðp ˆ.�rP   