o
    ZŽhK  ã                   @   s@   d 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VAN model configurationé   )ÚPretrainedConfig)Úloggingc                       sT   e Zd ZdZdZddg d¢g d¢g d¢g d¢g d	¢d
dddddf‡ fdd„	Z‡  ZS )Ú	VanConfigaÜ
  
    This is the configuration class to store the configuration of a [`VanModel`]. It is used to instantiate a VAN 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 VAN
    [Visual-Attention-Network/van-base](https://huggingface.co/Visual-Attention-Network/van-base) architecture.

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

    Args:
        image_size (`int`, *optional*, defaults to 224):
            The size (resolution) of each image.
        num_channels (`int`, *optional*, defaults to 3):
            The number of input channels.
        patch_sizes (`List[int]`, *optional*, defaults to `[7, 3, 3, 3]`):
            Patch size to use in each stage's embedding layer.
        strides (`List[int]`, *optional*, defaults to `[4, 2, 2, 2]`):
            Stride size to use in each stage's embedding layer to downsample the input.
        hidden_sizes (`List[int]`, *optional*, defaults to `[64, 128, 320, 512]`):
            Dimensionality (hidden size) at each stage.
        depths (`List[int]`, *optional*, defaults to `[3, 3, 12, 3]`):
            Depth (number of layers) for each stage.
        mlp_ratios (`List[int]`, *optional*, defaults to `[8, 8, 4, 4]`):
            The expansion ratio for mlp layer at each stage.
        hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
            The non-linear activation function (function or string) in each layer. If string, `"gelu"`, `"relu"`,
            `"selu"` and `"gelu_new"` are supported.
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        layer_norm_eps (`float`, *optional*, defaults to 1e-06):
            The epsilon used by the layer normalization layers.
        layer_scale_init_value (`float`, *optional*, defaults to 0.01):
            The initial value for layer scaling.
        drop_path_rate (`float`, *optional*, defaults to 0.0):
            The dropout probability for stochastic depth.
        dropout_rate (`float`, *optional*, defaults to 0.0):
            The dropout probability for dropout.

    Example:
    ```python
    >>> from transformers import VanModel, VanConfig

    >>> # Initializing a VAN van-base style configuration
    >>> configuration = VanConfig()
    >>> # Initializing a model from the van-base style configuration
    >>> model = VanModel(configuration)
    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Zvanéà   é   )é   r   r   r   )r   é   r   r   )é@   é€   i@  i   )r   r   é   r   )é   r   r   r   Zgelug{®Gáz”?gíµ ÷Æ°>g{®Gáz„?g        c                    sd   t ƒ jdi |¤Ž || _|| _|| _|| _|| _|| _|| _|| _	|	| _
|
| _|| _|| _|| _d S )N© )ÚsuperÚ__init__Ú
image_sizeÚnum_channelsÚpatch_sizesÚstridesÚhidden_sizesÚdepthsÚ
mlp_ratiosÚ
hidden_actÚinitializer_rangeÚlayer_norm_epsÚlayer_scale_init_valueÚdrop_path_rateÚdropout_rate)Úselfr   r   r   r   r   r   r   r   r   r   r   r   r   Úkwargs©Ú	__class__r   úc/var/www/auris/lib/python3.10/site-packages/transformers/models/deprecated/van/configuration_van.pyr   M   s   
zVanConfig.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z
model_typer   Ú__classcell__r   r   r   r!   r      s"    2òr   N)
r%   Zconfiguration_utilsr   Úutilsr   Z
get_loggerr"   Úloggerr   Ú__all__r   r   r   r!   Ú<module>   s   

V