
    iT                     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 EfficientNet model configuration    )strict   )PreTrainedConfig)auto_docstringzgoogle/efficientnet-b7)
checkpointc                       e Zd ZU dZdZdZeed<   dZee	e   z  e
eef   z  ed<   dZeed<   d	Zeed
<   dZeed<   dZe	e   e
edf   z  ed<   dZe	e   e
edf   z  ed<   dZe	e   e
edf   z  ed<   dZe	e   e
edf   z  ed<   dZe	e   e
edf   z  ed<   dZe	e   e
edf   z  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d)<   d*Zeez  ed+<   d,Zeez  ed-<    fd.Z  xZ!S )/EfficientNetConfiga  
    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.
    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.
    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.
    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"`]
    batch_norm_momentum (`float`, *optional*, defaults to 0.99):
        The momentum used by the batch normalization layers.
    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   num_channelsiX  
image_sizeg       @width_coefficientg@depth_coefficient   depth_divisor)r   r      r   r   r   r   .kernel_sizes)          (   P   p      in_channels)r   r   r   r   r   r   i@  out_channels depthwise_padding)      r   r   r   r   r   strides)r   r   r   r   r      r   num_block_repeats)r      r#   r#   r#   r#   r#   expand_ratiosg      ?squeeze_expansion_ratioswish
hidden_acti 
  
hidden_dimmeanpooling_typeg{Gz?initializer_rangegMbP?batch_norm_epsgGz?batch_norm_momentumg      ?dropout_rateg?drop_connect_ratec                 ^    t        |   di | t        | j                        dz  | _        y )Nr!   r   )super__post_init__sumr"   num_hidden_layers)selfkwargs	__class__s     /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/efficientnet/configuration_efficientnet.pyr2   z EfficientNetConfig.__post_init__Z   s+    ''!$T%;%;!<q!@    )"__name__
__module____qualname____doc__
model_typer   int__annotations__r   listtupler   floatr   r   r   r   r   r   r    r"   r$   r%   r'   strr(   r*   r+   r,   r-   r.   r/   r2   __classcell__)r7   s   @r8   r	   r	      s   'R  JL#47Jd3i%S/17"u""u"M30EL$s)eCHo-E/MKcU38_,M0OL$s)eCHo-O57tCy5c?27+@GT#YsCx(@5JtCy5c?2J1FM49uS#X.F%)U)JJL##u#!NE!!%% #L%#+#%(us{(A Ar9   r	   N)	r=   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r   r9   r8   <module>rJ      sN    ' . 3 # 34DA) DA  5DAN  
 r9   