o
    ¾e¦i	  ã                   @   sX   d Z ddlmZ ddlmZ ddlmZ ddlmZ e 	e
¡ZG dd„ deƒZdgZd	S )
zVitPose model configurationé   )Ú%consolidate_backbone_kwargs_to_config)ÚPreTrainedConfig)Úloggingé   )Ú
AutoConfigc                	       sL   e Zd ZdZdZdeiZ				ddedB ded	e	d
e
f‡ fdd„Z‡  ZS )ÚVitPoseConfiga)  
    This is the configuration class to store the configuration of a [`VitPoseForPoseEstimation`]. It is used to instantiate a
    VitPose 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 VitPose
    [usyd-community/vitpose-base-simple](https://huggingface.co/usyd-community/vitpose-base-simple) architecture.

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

    Args:
        backbone_config (`Union[dict, "PreTrainedConfig"]`, *optional*, defaults to `VitPoseBackboneConfig()`):
            The configuration of the backbone model. Currently, only `backbone_config` with `vitpose_backbone` as `model_type` is supported.
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        scale_factor (`int`, *optional*, defaults to 4):
            Factor to upscale the feature maps coming from the ViT backbone.
        use_simple_decoder (`bool`, *optional*, defaults to `True`):
            Whether to use a `VitPoseSimpleDecoder` to decode the feature maps from the backbone into heatmaps. Otherwise it uses `VitPoseClassicDecoder`.


    Example:

    ```python
    >>> from transformers import VitPoseConfig, VitPoseForPoseEstimation

    >>> # Initializing a VitPose configuration
    >>> configuration = VitPoseConfig()

    >>> # Initializing a model (with random weights) from the configuration
    >>> model = VitPoseForPoseEstimation(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚvitposeÚbackbone_configNç{®Gáz”?é   TÚinitializer_rangeÚscale_factorÚuse_simple_decoderc                    sN   t d|dddgidœ|¤Ž\}}|| _|| _|| _|| _tƒ jdi |¤Ž d S )NÚvitpose_backboneÚout_indicesr   )r	   Údefault_config_typeÚdefault_config_kwargs© )r   r	   r   r   r   ÚsuperÚ__init__)Úselfr	   r   r   r   Úkwargs©Ú	__class__r   úo/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/transformers/models/vitpose/configuration_vitpose.pyr   @   s   ý
üzVitPoseConfig.__init__)Nr
   r   T)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   Úsub_configsr   ÚfloatÚintÚboolr   Ú__classcell__r   r   r   r   r      s"    #ûþýüûr   N)r   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   Úauto.configuration_autor   Ú
get_loggerr   Úloggerr   Ú__all__r   r   r   r   Ú<module>   s   

>