






"""simple docstring"""





from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase_	:				Any										= logging.get_logger(__name__)

UpperCamelCase_	:				Any										= {
    """snap-research/efficientformer-l1-300""": (
        """https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"""
    ),
}


class      _lowercase (     lowerCAmelCase						):
      _a   :     Optional[Any]								=   '''efficientformer'''


      def __init__(    self				:	List[str]							,   a				:	List[int] = [3, 2, 6, 4]							,   a				:	List[int] = [4_8, 9_6, 2_2_4, 4_4_8]							,   a				:	List[bool] = [True, True, True, True]							,   a				:	int = 4_4_8							,   a				:	int = 3_2							,   a				:	int = 4							,   a				:	int = 7							,   a				:	int = 5							,   a				:	int = 8							,   a				:	int = 4							,   a				:	float = 0.0							,   a				:	int = 1_6							,   a				:	int = 3							,   a				:	int = 3							,   a				:	int = 3							,   a				:	int = 2							,   a				:	int = 1							,   a				:	float = 0.0							,   a				:	int = 1							,   a				:	bool = True							,   a				:	bool = True							,   a				:	float = 1e-5							,   a				:	str = "gelu"							,   a				:	float = 0.0_2							,   a				:	float = 1e-12							,   a				:	int = 2_2_4							,   a				:	float = 1e-05							,   **a				:	List[Any]							,   ):





            """simple docstring"""







            super().__init__(**a						)

            __snake_case      :    Union[str, Any]  			=hidden_act
            __snake_case      :    str  			=hidden_dropout_prob
            __snake_case      :    Optional[int]  			=hidden_sizes
            __snake_case      :    Optional[int]  			=num_hidden_layers
            __snake_case      :    Optional[Any]  			=num_attention_heads
            __snake_case      :    str  			=initializer_range
            __snake_case      :    Optional[int]  			=layer_norm_eps
            __snake_case      :    Any  			=patch_size
            __snake_case      :    List[str]  			=num_channels
            __snake_case      :    List[Any]  			=depths
            __snake_case      :    Optional[Any]  			=mlp_expansion_ratio
            __snake_case      :    Union[str, Any]  			=downsamples
            __snake_case      :    int  			=dim
            __snake_case      :    Tuple  			=key_dim
            __snake_case      :    List[Any]  			=attention_ratio
            __snake_case      :    Optional[int]  			=resolution
            __snake_case      :    str  			=pool_size
            __snake_case      :    int  			=downsample_patch_size
            __snake_case      :    List[Any]  			=downsample_stride
            __snake_case      :    Optional[Any]  			=downsample_pad
            __snake_case      :    Optional[int]  			=drop_path_rate
            __snake_case      :    Tuple  			=num_metaad_blocks
            __snake_case      :    int  			=distillation
            __snake_case      :    int  			=use_layer_scale
            __snake_case      :    Any  			=layer_scale_init_value
            __snake_case      :    List[Any]  			=image_size
            __snake_case      :    Tuple  			=batch_norm_eps










"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


UpperCamelCase_	:				str										= {"""processing_layoutxlm""": ["""LayoutXLMProcessor"""]}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCamelCase_	:				Union[str, Any]										= ["""LayoutXLMTokenizer"""]

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCamelCase_	:				Optional[int]										= ["""LayoutXLMTokenizerFast"""]

if TYPE_CHECKING:
    from .processing_layoutxlm import LayoutXLMProcessor

    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_layoutxlm import LayoutXLMTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_layoutxlm_fast import LayoutXLMTokenizerFast

else:
    import sys

    UpperCamelCase_	:				List[Any]										= _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


