





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


A   : Tuple     =				logging.get_logger(__name__)

A   : str     =				{
    '''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   A      (SCREAMING_SNAKE_CASE   ):
			'''simple docstring'''




			__lowerCamelCase     :	List[Any]          =   '''levit'''






			def __init__(      self       :   str							,     __lowerCAmelCase       :   Dict=2_24							,     __lowerCAmelCase       :   int=3							,     __lowerCAmelCase       :   Dict=3							,     __lowerCAmelCase       :   Optional[Any]=2							,     __lowerCAmelCase       :   Dict=1							,     __lowerCAmelCase       :   Optional[Any]=16							,     __lowerCAmelCase       :   Optional[int]=[1_28, 2_56, 3_84]							,     __lowerCAmelCase       :   Optional[int]=[4, 8, 12]							,     __lowerCAmelCase       :   Dict=[4, 4, 4]							,     __lowerCAmelCase       :   Dict=[16, 16, 16]							,     __lowerCAmelCase       :   Optional[int]=0							,     __lowerCAmelCase       :   Optional[int]=[2, 2, 2]							,     __lowerCAmelCase       :   Optional[int]=[2, 2, 2]							,     __lowerCAmelCase       :   Dict=0.0_2							,     **__lowerCAmelCase       :   Dict							,     )     ->     int:







					"""simple docstring"""






					super().__init__(**__UpperCAmelCase       )
					A__  				=       image_size
					A__  				=       num_channels
					A__  				=       kernel_size
					A__  				=       stride
					A__  				=       padding
					A__  				=       hidden_sizes
					A__  				=       num_attention_heads
					A__  				=       depths
					A__  				=       key_dim
					A__  				=       drop_path_rate
					A__  				=       patch_size
					A__  				=       attention_ratio
					A__  				=       mlp_ratio
					A__  				=       initializer_range
					A__  				=       [
					    ["""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   A      (SCREAMING_SNAKE_CASE   ):
			'''simple docstring'''




			__lowerCamelCase     :	Tuple          =   version.parse('''1.11'''   )






			@property
			def        a_	(      self       :   str       )     ->     Mapping[str, Mapping[int, str]]:







					"""simple docstring"""






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







			@property
			def        a_	(      self       :   int       )     ->     float:







					"""simple docstring"""






					return 1e-4










from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


A   : Optional[Any]			=				{'''configuration_vit_mae''': ['''VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ViTMAEConfig''']}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					A   : List[str]			=				[
					    '''VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''ViTMAEForPreTraining''',
					    '''ViTMAELayer''',
					    '''ViTMAEModel''',
					    '''ViTMAEPreTrainedModel''',
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					A   : Any			=				[
					    '''TFViTMAEForPreTraining''',
					    '''TFViTMAEModel''',
					    '''TFViTMAEPreTrainedModel''',
					]

if TYPE_CHECKING:
					from .configuration_vit_mae import VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMAEConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_vit_mae import (
										    VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST,
										    ViTMAEForPreTraining,
										    ViTMAELayer,
										    ViTMAEModel,
										    ViTMAEPreTrainedModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_vit_mae import TFViTMAEForPreTraining, TFViTMAEModel, TFViTMAEPreTrainedModel


else:
					import sys

					A   : str			=				_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



