
    fTh                         S r SSKJr  SSK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 EfficientNet model configuration    OrderedDict)ListMapping)version   )PretrainedConfig)
OnnxConfig)loggingc            +          ^  \ rS rSrSrSrSSSSS/ S	Q/ S
Q/ SQ/ / SQ/ SQ/ SQSSSSSSSSS4S\S\S\S\S\S\\   S\\   S\\   S \\   S!\\   S"\\   S#\\   S$\S%\	S&\S'\	S(\S)\S*\S+\S,\4*U 4S- jjjr
S.rU =r$ )/EfficientNetConfig   a/  
This is the configuration class to store the configuration of a [`EfficientNetModel`]. It is used to instantiate an
EfficientNet 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 EfficientNet
[google/efficientnet-b7](https://huggingface.co/google/efficientnet-b7) architecture.

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

Args:
    num_channels (`int`, *optional*, defaults to 3):
        The number of input channels.
    image_size (`int`, *optional*, defaults to 600):
        The input image size.
    width_coefficient (`float`, *optional*, defaults to 2.0):
        Scaling coefficient for network width at each stage.
    depth_coefficient (`float`, *optional*, defaults to 3.1):
        Scaling coefficient for network depth at each stage.
    depth_divisor `int`, *optional*, defaults to 8):
        A unit of network width.
    kernel_sizes (`List[int]`, *optional*, defaults to `[3, 3, 5, 3, 5, 5, 3]`):
        List of kernel sizes to be used in each block.
    in_channels (`List[int]`, *optional*, defaults to `[32, 16, 24, 40, 80, 112, 192]`):
        List of input channel sizes to be used in each block for convolutional layers.
    out_channels (`List[int]`, *optional*, defaults to `[16, 24, 40, 80, 112, 192, 320]`):
        List of output channel sizes to be used in each block for convolutional layers.
    depthwise_padding (`List[int]`, *optional*, defaults to `[]`):
        List of block indices with square padding.
    strides (`List[int]`, *optional*, defaults to `[1, 2, 2, 2, 1, 2, 1]`):
        List of stride sizes to be used in each block for convolutional layers.
    num_block_repeats (`List[int]`, *optional*, defaults to `[1, 2, 2, 3, 3, 4, 1]`):
        List of the number of times each block is to repeated.
    expand_ratios (`List[int]`, *optional*, defaults to `[1, 6, 6, 6, 6, 6, 6]`):
        List of scaling coefficient of each block.
    squeeze_expansion_ratio (`float`, *optional*, defaults to 0.25):
        Squeeze expansion ratio.
    hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
        The non-linear activation function (function or string) in each block. If string, `"gelu"`, `"relu"`,
        `"selu", `"gelu_new"`, `"silu"` and `"mish"` are supported.
    hidden_dim (`int`, *optional*, defaults to 1280):
        The hidden dimension of the layer before the classification head.
    pooling_type (`str` or `function`, *optional*, defaults to `"mean"`):
        Type of final pooling to be applied before the dense classification head. Available options are [`"mean"`,
        `"max"`]
    initializer_range (`float`, *optional*, defaults to 0.02):
        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
    batch_norm_eps (`float`, *optional*, defaults to 1e-3):
        The epsilon used by the batch normalization layers.
    batch_norm_momentum (`float`, *optional*, defaults to 0.99):
        The momentum used by the batch normalization layers.
    dropout_rate (`float`, *optional*, defaults to 0.5):
        The dropout rate to be applied before final classifier layer.
    drop_connect_rate (`float`, *optional*, defaults to 0.2):
        The drop rate for skip connections.

Example:
```python
>>> from transformers import EfficientNetConfig, EfficientNetModel

>>> # Initializing a EfficientNet efficientnet-b7 style configuration
>>> configuration = EfficientNetConfig()

>>> # Initializing a model (with random weights) from the efficientnet-b7 style configuration
>>> model = EfficientNetModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```efficientnetr   iX  g       @g@   )r   r      r   r   r   r   )          (   P   p      )r   r   r   r   r   r   i@  )      r   r   r   r   r   )r   r   r   r   r      r   )r      r   r   r   r   r   g      ?swishi 
  meang{Gz?gMbP?gGz?g      ?g?num_channels
image_sizewidth_coefficientdepth_coefficientdepth_divisorkernel_sizesin_channelsout_channelsdepthwise_paddingstridesnum_block_repeatsexpand_ratiossqueeze_expansion_ratio
hidden_act
hidden_dimpooling_typeinitializer_rangebatch_norm_epsbatch_norm_momentumdropout_ratedrop_connect_ratec                 T  > [         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        UU l        UU l        UU l        [/        U5      S-  U l        g )Nr    )super__init__r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   sumnum_hidden_layers)selfr   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   kwargs	__class__s                          s/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/efficientnet/configuration_efficientnet.pyr7   EfficientNetConfig.__init__f   s    2 	"6"($!2!2*(&(!2!2*'>$$$(!2,#6 (!2!$%6!7!!;    )r0   r1   r"   r#   r'   r3   r2   r*   r,   r-   r    r%   r/   r$   r)   r   r9   r&   r.   r+   r(   r!   )__name__
__module____qualname____firstlineno____doc__
model_typeintfloatr   strr7   __static_attributes____classcell__)r<   s   @r=   r   r      sH   CJ  J #&#&"7!?"A')2'<#8)-!"#' %%)!#&-0<0< 0< !	0<
 !0< 0< 3i0< #Y0< 3i0<  90< c0<  90< Cy0< "'0< 0<  !0<" #0<$ !%0<& '0<( #)0<* +0<, !-0< 0<r?   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rg)EfficientNetOnnxConfig   z1.11returnc                 (    [        SSSSSS.4/5      $ )Npixel_valuesbatchr   heightwidth)r   r   r   r   r   r:   s    r=   inputsEfficientNetOnnxConfig.inputs   s&    WHQX!YZ
 	
r?   c                     g)Ngh㈵>r5   rT   s    r=   atol_for_validation*EfficientNetOnnxConfig.atol_for_validation   s    r?   r5   N)r@   rA   rB   rC   r   parsetorch_onnx_minimum_versionpropertyr   rH   rF   rU   rG   rX   rI   r5   r?   r=   rL   rL      sX    !(v!6
WS#X%6 67 
 
 U  r?   rL   N)rD   collectionsr   typingr   r   	packagingr   configuration_utilsr	   onnxr
   utilsr   
get_loggerr@   loggerr   rL   __all__r5   r?   r=   <module>rf      sW    ' #    3   
		H	%x<) x<vZ    !9
:r?   