"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


SCREAMING_SNAKE_CASE__      						=  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__      						=  {
    "facebook/levit-128S": "https://huggingface.co/facebook/levit-128S/resolve/main/config.json",
    # See all LeViT models at https://huggingface.co/models?filter=levit
}



class   lowerCAmelCase_    (			lowerCAmelCase					):



				"""simple docstring"""
				_lowerCAmelCase     :    Optional[int]			  =						"""levit"""

				def __init__(				self		,    lowerCAmelCase=2_24		,    lowerCAmelCase=3		,    lowerCAmelCase=3		,    lowerCAmelCase=2		,    lowerCAmelCase=1		,    lowerCAmelCase=16		,    lowerCAmelCase=[1_28, 2_56, 3_84]		,    lowerCAmelCase=[4, 8, 12]		,    lowerCAmelCase=[4, 4, 4]		,    lowerCAmelCase=[16, 16, 16]		,    lowerCAmelCase=0		,    lowerCAmelCase=[2, 2, 2]		,    lowerCAmelCase=[2, 2, 2]		,    lowerCAmelCase=0.02		,    **lowerCAmelCase		,    ):






										"""simple docstring"""

										super().__init__(**lowerCAmelCase    )
										snake_case								=			image_size
										snake_case								=			num_channels
										snake_case								=			kernel_size
										snake_case								=			stride
										snake_case								=			padding
										snake_case								=			hidden_sizes
										snake_case								=			num_attention_heads
										snake_case								=			depths
										snake_case								=			key_dim
										snake_case								=			drop_path_rate
										snake_case								=			patch_size
										snake_case								=			attention_ratio
										snake_case								=			mlp_ratio
										snake_case								=			initializer_range
										snake_case								=			[
										    ['Subsample', key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
										    ['Subsample', key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
										]





class   lowerCAmelCase_    (			lowerCAmelCase					):



				"""simple docstring"""
				_lowerCAmelCase     :    Optional[int]			  =						version.parse("""1.11"""					)

				@property
				def 		snake_case (				self    ):






										"""simple docstring"""

										return OrderedDict(
										    [
										        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
										    ]    )

				@property
				def 		snake_case (				self    ):






										"""simple docstring"""

										return 1E-4



"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE__      						=  {"configuration_sew": ["SEW_PRETRAINED_CONFIG_ARCHIVE_MAP", "SEWConfig"]}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE__      						=  [
					    "SEW_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "SEWForCTC",
					    "SEWForSequenceClassification",
					    "SEWModel",
					    "SEWPreTrainedModel",
					]

if TYPE_CHECKING:
					from .configuration_sew import SEW_PRETRAINED_CONFIG_ARCHIVE_MAP, SEWConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_sew import (
										    SEW_PRETRAINED_MODEL_ARCHIVE_LIST,
										    SEWForCTC,
										    SEWForSequenceClassification,
										    SEWModel,
										    SEWPreTrainedModel,
										)


else:
					import sys

					SCREAMING_SNAKE_CASE__      						=  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


