
    fTh2                         S r SSKJr  SSKJrJrJr  SSKJr  SSK	J
r
  SSKJr  SSKJr  \R                  " \5      r " S	 S
\
5      r " S S\5      rS
S/rg)zPvt model configuration    OrderedDict)CallableListMapping)version   )PretrainedConfig)
OnnxConfig)loggingc            %          ^  \ rS rSrSrSrSSS/ SQ/ SQ/ S	Q/ S
Q/ S
Q/ SQ/ SQSSSSSSSS4S\S\S\S\\   S\\   S\\   S\\   S\\   S\\   S\\   S\\	\
4   S\S\S \S!\S"\S#\S$\4$U 4S% jjjrS&rU =r$ )'	PvtConfig    aq  
This is the configuration class to store the configuration of a [`PvtModel`]. It is used to instantiate an Pvt
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 Pvt
[Xrenya/pvt-tiny-224](https://huggingface.co/Xrenya/pvt-tiny-224) 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 input image size
    num_channels (`int`, *optional*, defaults to 3):
        The number of input channels.
    num_encoder_blocks (`int`, *optional*, defaults to 4):
        The number of encoder blocks (i.e. stages in the Mix Transformer encoder).
    depths (`List[int]`, *optional*, defaults to `[2, 2, 2, 2]`):
        The number of layers in each encoder block.
    sequence_reduction_ratios (`List[int]`, *optional*, defaults to `[8, 4, 2, 1]`):
        Sequence reduction ratios in each encoder block.
    hidden_sizes (`List[int]`, *optional*, defaults to `[64, 128, 320, 512]`):
        Dimension of each of the encoder blocks.
    patch_sizes (`List[int]`, *optional*, defaults to `[4, 2, 2, 2]`):
        Patch size before each encoder block.
    strides (`List[int]`, *optional*, defaults to `[4, 2, 2, 2]`):
        Stride before each encoder block.
    num_attention_heads (`List[int]`, *optional*, defaults to `[1, 2, 5, 8]`):
        Number of attention heads for each attention layer in each block of the Transformer encoder.
    mlp_ratios (`List[int]`, *optional*, defaults to `[8, 8, 4, 4]`):
        Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
        encoder blocks.
    hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
        The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
        `"relu"`, `"selu"` and `"gelu_new"` are supported.
    hidden_dropout_prob (`float`, *optional*, defaults to 0.0):
        The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
    attention_probs_dropout_prob (`float`, *optional*, defaults to 0.0):
        The dropout ratio for the attention probabilities.
    initializer_range (`float`, *optional*, defaults to 0.02):
        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
    drop_path_rate (`float`, *optional*, defaults to 0.0):
        The dropout probability for stochastic depth, used in the blocks of the Transformer encoder.
    layer_norm_eps (`float`, *optional*, defaults to 1e-06):
        The epsilon used by the layer normalization layers.
    qkv_bias (`bool`, *optional*, defaults to `True`):
        Whether or not a learnable bias should be added to the queries, keys and values.
    num_labels ('int', *optional*, defaults to 1000):
        The number of classes.
Example:

```python
>>> from transformers import PvtModel, PvtConfig

>>> # Initializing a PVT Xrenya/pvt-tiny-224 style configuration
>>> configuration = PvtConfig()

>>> # Initializing a model from the Xrenya/pvt-tiny-224 style configuration
>>> model = PvtModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```pvt   r	      )   r   r   r   )   r   r      )@      i@  i   )r   r   r   r   )r   r      r   )r   r   r   r   gelug        g{Gz?gư>Ti  
image_sizenum_channelsnum_encoder_blocksdepthssequence_reduction_ratioshidden_sizespatch_sizesstridesnum_attention_heads
mlp_ratios
hidden_acthidden_dropout_probattention_probs_dropout_probinitializer_rangedrop_path_ratelayer_norm_epsqkv_bias
num_labelsc                   > [         TU ]  " S0 UD6  Xl        X l        X0l        X@l        XPl        X`l        Xpl        Xl	        Xl
        Xl        Xl        Xl        Xl        Xl        Xl        UU l        UU l        UU l        g )N )super__init__r   r   r   r   r   r   r    r!   r#   r"   r$   r%   r&   r'   r(   r)   r+   r*   )selfr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   kwargs	__class__s                       a/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/pvt/configuration_pvt.pyr/   PvtConfig.__init__b   s    , 	"6"$("4)B&(&$#6 $#6 ,H)!2,,$     )r&   r   r(   r$   r%   r   r   r'   r)   r#   r"   r   r   r+   r    r*   r   r!   )__name__
__module____qualname____firstlineno____doc__
model_typeintr   r   strr   floatboolr/   __static_attributes____classcell__)r2   s   @r3   r   r       s)   =~ J "#(/;"5!-))5 ,-3%(.1#' # $')!)! )!  	)!
 S	)! $(9)! 3i)! #Y)! c)! "#Y)! I)! CM*)! #)! ',)! !)!  !)!" #)!$ %)!& ')! )!r5   r   c                       \ rS rSr\R
                  " S5      r\S\\	\\
\	4   4   4S j5       r\S\4S j5       r\S\
4S j5       rSrg)	PvtOnnxConfig   z1.11returnc                 (    [        SSSSSS.4/5      $ )Npixel_valuesbatchr   heightwidth)r   r   r   r	   r   r0   s    r3   inputsPvtOnnxConfig.inputs   s&    WHQX!YZ
 	
r5   c                     g)Ng-C6?r-   rK   s    r3   atol_for_validation!PvtOnnxConfig.atol_for_validation   s    r5   c                     g)N   r-   rK   s    r3   default_onnx_opset PvtOnnxConfig.default_onnx_opset   s    r5   r-   N)r6   r7   r8   r9   r   parsetorch_onnx_minimum_versionpropertyr   r=   r<   rL   r>   rO   rS   r@   r-   r5   r3   rC   rC      ss    !(v!6
WS#X%6 67 
 
 U   C  r5   rC   N)r:   collectionsr   typingr   r   r   	packagingr   configuration_utilsr
   onnxr   utilsr   
get_loggerr6   loggerr   rC   __all__r-   r5   r3   <module>ra      sY   "  # * *  3   
		H	%k!  k!\J ( 
(r5   