





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


_snake_case    :       Optional[int]		       =    logging.get_logger(__name__)

_snake_case    :       Union[str, Any]		       =    {
    'MIT/ast-finetuned-audioset-10-10-0.4593': (
        'https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json'
    ),
}



class 							_UpperCAmelCase       (       _UpperCamelCase       ):

  """simple docstring"""


  a_              =					"""audio-spectrogram-transformer"""






  def __init__(							self					:						Union[str, Any]   ,    lowerCAmelCase_					:						int=7_6_8   ,    lowerCAmelCase_					:						List[Any]=1_2   ,    lowerCAmelCase_					:						int=1_2   ,    lowerCAmelCase_					:						Union[str, Any]=3_0_7_2   ,    lowerCAmelCase_					:						Union[str, Any]="gelu"   ,    lowerCAmelCase_					:						Dict=0.0   ,    lowerCAmelCase_					:						Any=0.0   ,    lowerCAmelCase_					:						List[Any]=0.02   ,    lowerCAmelCase_					:						Optional[Any]=1e-12   ,    lowerCAmelCase_					:						Union[str, Any]=1_6   ,    lowerCAmelCase_					:						Any=True   ,    lowerCAmelCase_					:						str=1_0   ,    lowerCAmelCase_					:						List[Any]=1_0   ,    lowerCAmelCase_					:						Dict=1_0_2_4   ,    lowerCAmelCase_					:						Union[str, Any]=1_2_8   ,    **lowerCAmelCase_					:						str   ,    )				->		Any:
     super().__init__(**lowerCAmelCase_	)

     __lowerCAmelCase				      =      hidden_size
     __lowerCAmelCase				      =      num_hidden_layers
     __lowerCAmelCase				      =      num_attention_heads
     __lowerCAmelCase				      =      intermediate_size
     __lowerCAmelCase				      =      hidden_act
     __lowerCAmelCase				      =      hidden_dropout_prob
     __lowerCAmelCase				      =      attention_probs_dropout_prob
     __lowerCAmelCase				      =      initializer_range
     __lowerCAmelCase				      =      layer_norm_eps
     __lowerCAmelCase				      =      patch_size
     __lowerCAmelCase				      =      qkv_bias
     __lowerCAmelCase				      =      frequency_stride
     __lowerCAmelCase				      =      time_stride
     __lowerCAmelCase				      =      max_length
     __lowerCAmelCase				      =      num_mel_bins






from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

_lowerCamelCase    :		Dict		      =    typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
_lowerCamelCase    :		Any		      =    typing.Union[np.floataa, int, float]  # noqa: UP007

def        __a			(   __lowerCAmelCase      ,	__lowerCAmelCase   )     ->     VectorOut:
					return np.sqrt(np.sum((np.asarray(__lowerCAmelCase   ) - np.asarray(__lowerCAmelCase   )) ** 2   )   )

def        __a			(   __lowerCAmelCase      ,	__lowerCAmelCase   )     ->     VectorOut:
					return sum((va - va) ** 2 for va, va in zip(__lowerCAmelCase      ,	__lowerCAmelCase   )   ) ** (1 / 2)


if __name__ == "__main__":

			def        __a			(   )     ->     None:
								from timeit import timeit

								print('Without Numpy'   )
								print(
								    timeit(
								        'euclidean_distance_no_np([1, 2, 3], [4, 5, 6])'      ,	number=1_0000      ,	globals=globals()      ,	)   )
								print('With Numpy'   )
								print(
								    timeit(
								        'euclidean_distance([1, 2, 3], [4, 5, 6])'      ,	number=1_0000      ,	globals=globals()      ,	)   )



			benchmark()