
    ^jR
                     j    d 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ViViT model configuration    )strict   )PreTrainedConfig)auto_docstringzgoogle/vivit-b-16x2-kinetics400)
checkpointc                   L    e Zd ZU dZdZdZeee   z  eeef   z  e	d<   dZ
ee	d<   dZee   eedf   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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dz  e	d<   d Zee	d!<    fd"Z xZS )#VivitConfiga  
    num_frames (`int`, *optional*, defaults to 32):
        The number of frames in each video.
    tubelet_size (`list[int]`, *optional*, defaults to `[2, 16, 16]`):
        The size (resolution) of each tubelet.
    pooler_output_size (`int`, *optional*):
        Dimensionality of the pooler layer. If None, defaults to `hidden_size`.
    pooler_act (`str`, *optional*, defaults to `"tanh"`):
        The activation function to be used by the pooler.

    Example:

    ```python
    >>> from transformers import VivitConfig, VivitModel

    >>> # Initializing a ViViT google/vivit-b-16x2-kinetics400 style configuration
    >>> configuration = VivitConfig()

    >>> # Initializing a model (with random weights) from the google/vivit-b-16x2-kinetics400 style configuration
    >>> model = VivitModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```vivit   
image_size    
num_frames)      r   .tubelet_sizer   num_channelsi   hidden_size   num_hidden_layersnum_attention_headsi   intermediate_size	gelu_fast
hidden_actg        hidden_dropout_probattention_probs_dropout_probg{Gz?initializer_rangegư>layer_norm_epsTqkv_biasNpooler_output_sizetanh
pooler_actc                 v    | j                   r| j                   n| j                  | _         t        |   di | y )N )r   r   super__post_init__)selfkwargs	__class__s     x/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/vivit/configuration_vivit.pyr%   zVivitConfig.__post_init__E   s2    =A=T=T$"9"9Z^ZjZj''    )__name__
__module____qualname____doc__
model_typer   intlisttuple__annotations__r   r   r   r   r   r   r   r   strr   floatr   r   r   r   boolr   r!   r%   __classcell__)r(   s   @r)   r	   r	      s    2 J47Jd3i%S/17J0;L$s)eCHo-;L#Ks!!!s!!J!'**03 %#+3#u#!NE!Hd%)d
)J( (r*   r	   N)	r.   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r#   r*   r)   <module>r<      sG      . 3 # <=/(" /(  >/(d /r*   