
    sg1                     Z    d Z ddlmZ ddlmZ  ej
                  e      Z G d de      Zy)zVAN model configuration   )PretrainedConfig)loggingc                   V     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	Z x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
    ```van      )   r	   r	   r	   )r      r   r   )@      i@  i   )r	   r	      r	   )   r   r   r   gelug{Gz?gư>g{Gz?g        c                     t        |   di | || _        || _        || _        || _        || _        || _        || _        || _	        |	| _
        |
| _        || _        || _        || _        y )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__s                  g/var/www/html/venv/lib/python3.12/site-packages/transformers/models/deprecated/van/configuration_van.pyr   zVanConfig.__init__M   sx    " 	"6"$(&($$!2,&<#,(    )__name__
__module____qualname____doc__
model_typer   __classcell__)r$   s   @r%   r   r      sC    0d J  (#) )r&   r   N)	r*   configuration_utilsr   utilsr   
get_loggerr'   loggerr   r   r&   r%   <module>r1      s3     4  
		H	%S)  S)r&   