Ë
    ÜÓ^jF  ã                   ó„   — 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e«      «       «       ZdgZy)zResNet model configurationé    )ÚClassVar)Ústricté   )ÚBackboneConfigMixin)ÚPreTrainedConfig)Úauto_docstringzmicrosoft/resnet-50)Ú
checkpointc                   óô   ‡ — e Zd ZU dZdZddgZeee      e	d<   dZ
ee	d<   dZee	d	<   d
Zee   eedf   z  dz  e	d<   dZee   eedf   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<   ˆ fd„Zd„ Zˆ xZS )ÚResNetConfigaô  
    layer_type (`str`, *optional*, defaults to `"bottleneck"`):
        The layer to use, it can be either `"basic"` (used for smaller models, like resnet-18 or resnet-34) or
        `"bottleneck"` (used for larger models like resnet-50 and above).
    downsample_in_first_stage (`bool`, *optional*, defaults to `False`):
        If `True`, the first stage will downsample the inputs using a `stride` of 2.
    downsample_in_bottleneck (`bool`, *optional*, defaults to `False`):
        If `True`, the first conv 1x1 in ResNetBottleNeckLayer will downsample the inputs using a `stride` of 2.

    Example:
    ```python
    >>> from transformers import ResNetConfig, ResNetModel

    >>> # Initializing a ResNet resnet-50 style configuration
    >>> configuration = ResNetConfig()

    >>> # Initializing a model (with random weights) from the resnet-50 style configuration
    >>> model = ResNetModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
    ÚresnetÚbasicÚ
bottleneckÚlayer_typesr   Únum_channelsé@   Úembedding_size)é   i   i   i   .NÚhidden_sizes)r   é   é   r   ÚdepthsÚ
layer_typeÚreluÚ
hidden_actFÚdownsample_in_first_stageÚdownsample_in_bottleneckc                 ó@  •— dgt        dt        | j                  «      dz   «      D �cg c]  }d|› �‘Œ	 c}z   | _        | j	                  |j                  dd «      |j                  dd «      ¬«       t        | j                  «      | _        t        ‰| �$  di |¤Ž y c c}w )NÚstemé   ÚstageÚout_indicesÚout_features)r!   r"   © )
ÚrangeÚlenr   Ústage_namesÚ"set_output_features_output_indicesÚpopÚlistr   ÚsuperÚ__post_init__)ÚselfÚkwargsÚidxÚ	__class__s      €úz/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/resnet/configuration_resnet.pyr+   zResNetConfig.__post_init__@   s”   ø€ Ø"˜8ÄÀaÌÈTÏ[É[ÓIYÐ\]ÑI]Ó@^Ö&_¸¨¨s¨e¢}Ò&_Ñ_ˆÔØ×/Ñ/ØŸ
™
 =°$Ó7ÀfÇjÁjÐQ_ÐaeÓFfð 	0ô 	
ô ! ×!2Ñ!2Ó3ˆÔÜ‰ÑÑ' Ó'ùò '`s   ¨Bc                 óœ   — | j                   | j                  vr4t        d| j                   › ddj                  | j                  «      › �«      ‚y)z.Check that `layer_types` is correctly defined.zlayer_type=z is not one of ú,N)r   r   Ú
ValueErrorÚjoin)r,   s    r0   Úvalidate_layer_typez ResNetConfig.validate_layer_typeH   sG   € à�?‰? $×"2Ñ"2Ñ2Ü˜{¨4¯?©?Ð*;¸?È3Ï8É8ÐTX×TdÑTdÓKeÐJfÐgÓhÐhð 3ó    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   r   r)   ÚstrÚ__annotations__r   Úintr   r   Útupler   r   r   r   Úboolr   r+   r5   Ú__classcell__)r/   s   @r0   r   r      s°   ø… ñð0 €JØ(/°Ð'>€K�˜$˜s™)Ñ$Ó>à€L�#ÓØ€N�CÓØ7M€L�$�s‘)˜e C¨ H™oÑ-°Ñ4ÓMØ1=€FˆD�‰I˜˜c 3˜h™Ñ'¨$Ñ.Ó=Ø"€J�Ó"Ø€J�ÓØ&+Ð˜tÓ+Ø%*Ð˜dÓ*ô(öir6   r   N)r:   Útypingr   Úhuggingface_hub.dataclassesr   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   r   Ú__all__r#   r6   r0   ú<module>rH      sT   ðñ !å å .å 1Ý 3Ý #ñ Ð0Ô1Øô0iÐ&Ð(8ó 0ió ó 2ð0iðf Ð
�r6   