



'''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


_UpperCamelCase											=						logging.get_logger(__name__)

_UpperCamelCase											=						{
    '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 					lowerCamelCase_    (				SCREAMING_SNAKE_CASE_     ):
  """simple docstring"""




  a_												="""deit"""




  def __init__( self      :	Union[str, Any]			,	_a      :	int=768			,	_a      :	Dict=12			,	_a      :	int=12			,	_a      :	List[str]=3072			,	_a      :	Dict="gelu"			,	_a      :	Tuple=0.0			,	_a      :	List[str]=0.0			,	_a      :	Union[str, Any]=0.02			,	_a      :	Optional[Any]=1e-12			,	_a      :	int=224			,	_a      :	Optional[Any]=16			,	_a      :	Optional[Any]=3			,	_a      :	List[Any]=True			,	_a      :	Dict=16			,	**_a      :	List[str]			,	)					->					Dict:
    super().__init__(**_a   )

    __lowerCamelCase       :       Union[str, Any]           = hidden_size
    __lowerCamelCase       :       Dict           = num_hidden_layers
    __lowerCamelCase       :       Union[str, Any]           = num_attention_heads
    __lowerCamelCase       :       str           = intermediate_size
    __lowerCamelCase       :       List[Any]           = hidden_act
    __lowerCamelCase       :       Optional[int]           = hidden_dropout_prob
    __lowerCamelCase       :       str           = attention_probs_dropout_prob
    __lowerCamelCase       :       List[str]           = initializer_range
    __lowerCamelCase       :       Optional[Any]           = layer_norm_eps
    __lowerCamelCase       :       List[Any]           = image_size
    __lowerCamelCase       :       List[Any]           = patch_size
    __lowerCamelCase       :       str           = num_channels
    __lowerCamelCase       :       Any           = qkv_bias
    __lowerCamelCase       :       int           = encoder_stride






class 					lowerCamelCase_    (				SCREAMING_SNAKE_CASE_     ):
  """simple docstring"""




  a_												=version.parse("""1.11"""     )




  @property
  def 						_lowercase     ( self      :	Optional[int]   )					->					Mapping[str, Mapping[int, str]]:
    return OrderedDict(
        [
            ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
        ]   )




  @property
  def 						_lowercase     ( self      :	Dict   )					->					float:
    return 1e-4











'''simple docstring'''





from typing import TYPE_CHECKING

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


_UpperCamelCase											=						{'configuration_speech_encoder_decoder': ['SpeechEncoderDecoderConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCamelCase											=						['SpeechEncoderDecoderModel']

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCamelCase											=						['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

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






