



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


__lowerCamelCase  :				Optional[Any]					=					logging.get_logger(__name__)

__lowerCamelCase  :				int					=					{
    "facebook/deit-base-distilled-patch16-224": (
        "https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json"
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}





class 			__magic_name__ (				snake_case__    ):
		lowercase   :							Optional[Any]        ='''deit'''






		def __init__(    self   :  Union[str, Any]					,		UpperCamelCase__   :  Tuple=7_68					,		UpperCamelCase__   :  Optional[int]=12					,		UpperCamelCase__   :  Optional[int]=12					,		UpperCamelCase__   :  Optional[int]=30_72					,		UpperCamelCase__   :  int="gelu"					,		UpperCamelCase__   :  int=0.0					,		UpperCamelCase__   :  List[Any]=0.0					,		UpperCamelCase__   :  Optional[Any]=0.02					,		UpperCamelCase__   :  str=1e-1_2					,		UpperCamelCase__   :  Optional[Any]=2_24					,		UpperCamelCase__   :  str=16					,		UpperCamelCase__   :  List[str]=3					,		UpperCamelCase__   :  Optional[Any]=True					,		UpperCamelCase__   :  Optional[Any]=16					,		**UpperCamelCase__   :  int					,		)					->       int:
								'''simple docstring'''







								super().__init__(**__snake_case   )

								UpperCAmelCase								=  hidden_size
								UpperCAmelCase								=  num_hidden_layers
								UpperCAmelCase								=  num_attention_heads
								UpperCAmelCase								=  intermediate_size
								UpperCAmelCase								=  hidden_act
								UpperCAmelCase								=  hidden_dropout_prob
								UpperCAmelCase								=  attention_probs_dropout_prob
								UpperCAmelCase								=  initializer_range
								UpperCAmelCase								=  layer_norm_eps
								UpperCAmelCase								=  image_size
								UpperCAmelCase								=  patch_size
								UpperCAmelCase								=  num_channels
								UpperCAmelCase								=  qkv_bias
								UpperCAmelCase								=  encoder_stride





class 			__magic_name__ (				snake_case__    ):
		lowercase   :							List[str]        =version.parse('''1.11'''    )






		@property
		def SCREAMING_SNAKE_CASE_      (    self   :  Dict   )					->       int:
								'''simple docstring'''







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







		@property
		def SCREAMING_SNAKE_CASE_      (    self   :  List[Any]   )					->       str:
								'''simple docstring'''







								return 1e-4







from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE     :					Optional[int]      =       {"configuration_speech_encoder_decoder": ["SpeechEncoderDecoderConfig"]}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _SCREAMING_SNAKE_CASE     :					Optional[int]      =       ["SpeechEncoderDecoderModel"]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _SCREAMING_SNAKE_CASE     :					Dict      =       ["FlaxSpeechEncoderDecoderModel"]

if TYPE_CHECKING:
 from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_speech_encoder_decoder import SpeechEncoderDecoderModel

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_speech_encoder_decoder import FlaxSpeechEncoderDecoderModel

else:
 import sys

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




