
"""simple docstring"""




from typing import List

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


UpperCAmelCase__      :    Any    							= logging.get_logger(__name__)

UpperCAmelCase__      :    str    							= {
    'snap-research/efficientformer-l1-300': (
        'https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json'
    ),
}



class 	lowerCAmelCase_						(a__  ):


				"""simple docstring"""



				__UpperCamelCase      :						List[str]					       =   '''efficientformer'''



				def __init__(self   ,       SCREAMING_SNAKE_CASE__ = [3, 2, 6, 4]   ,       SCREAMING_SNAKE_CASE__ = [48, 96, 2_24, 4_48]   ,       SCREAMING_SNAKE_CASE__ = [True, True, True, True]   ,       SCREAMING_SNAKE_CASE__ = 4_48   ,       SCREAMING_SNAKE_CASE__ = 32   ,       SCREAMING_SNAKE_CASE__ = 4   ,       SCREAMING_SNAKE_CASE__ = 7   ,       SCREAMING_SNAKE_CASE__ = 5   ,       SCREAMING_SNAKE_CASE__ = 8   ,       SCREAMING_SNAKE_CASE__ = 4   ,       SCREAMING_SNAKE_CASE__ = 0.0   ,       SCREAMING_SNAKE_CASE__ = 16   ,       SCREAMING_SNAKE_CASE__ = 3   ,       SCREAMING_SNAKE_CASE__ = 3   ,       SCREAMING_SNAKE_CASE__ = 3   ,       SCREAMING_SNAKE_CASE__ = 2   ,       SCREAMING_SNAKE_CASE__ = 1   ,       SCREAMING_SNAKE_CASE__ = 0.0   ,       SCREAMING_SNAKE_CASE__ = 1   ,       SCREAMING_SNAKE_CASE__ = True   ,       SCREAMING_SNAKE_CASE__ = True   ,       SCREAMING_SNAKE_CASE__ = 1E-5   ,       SCREAMING_SNAKE_CASE__ = "gelu"   ,       SCREAMING_SNAKE_CASE__ = 0.02   ,       SCREAMING_SNAKE_CASE__ = 1E-12   ,       SCREAMING_SNAKE_CASE__ = 2_24   ,       SCREAMING_SNAKE_CASE__ = 1E-05   ,       **SCREAMING_SNAKE_CASE__   ,       )					->		None:



											"""simple docstring"""




											super().__init__(**SCREAMING_SNAKE_CASE__    )

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








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


lowerCAmelCase       =							{
    'configuration_tapas': ['TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TapasConfig'],
    'tokenization_tapas': ['TapasTokenizer'],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCAmelCase       =							[
			    'TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST',
			    'TapasForMaskedLM',
			    'TapasForQuestionAnswering',
			    'TapasForSequenceClassification',
			    'TapasModel',
			    'TapasPreTrainedModel',
			    'load_tf_weights_in_tapas',
			]
try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCAmelCase       =							[
			    'TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST',
			    'TFTapasForMaskedLM',
			    'TFTapasForQuestionAnswering',
			    'TFTapasForSequenceClassification',
			    'TFTapasModel',
			    'TFTapasPreTrainedModel',
			]


if TYPE_CHECKING:
			from .configuration_tapas import TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP, TapasConfig
			from .tokenization_tapas import TapasTokenizer

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tapas import (
						    TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TapasForMaskedLM,
						    TapasForQuestionAnswering,
						    TapasForSequenceClassification,
						    TapasModel,
						    TapasPreTrainedModel,
						    load_tf_weights_in_tapas,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_tapas import (
						    TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFTapasForMaskedLM,
						    TFTapasForQuestionAnswering,
						    TFTapasForSequenceClassification,
						    TFTapasModel,
						    TFTapasPreTrainedModel,
						)


else:
			import sys

			lowerCAmelCase       =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


