
"""simple docstring"""




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


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

UpperCAmelCase__      :    Dict    							= {
    'MIT/ast-finetuned-audioset-10-10-0.4593': (
        'https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json'
    ),
}



class 	lowerCAmelCase_						(a__  ):


				"""simple docstring"""



				__UpperCamelCase      :						Optional[int]					       =   '''audio-spectrogram-transformer'''



				def __init__(self   ,       SCREAMING_SNAKE_CASE__=7_68   ,       SCREAMING_SNAKE_CASE__=12   ,       SCREAMING_SNAKE_CASE__=12   ,       SCREAMING_SNAKE_CASE__=30_72   ,       SCREAMING_SNAKE_CASE__="gelu"   ,       SCREAMING_SNAKE_CASE__=0.0   ,       SCREAMING_SNAKE_CASE__=0.0   ,       SCREAMING_SNAKE_CASE__=0.02   ,       SCREAMING_SNAKE_CASE__=1E-12   ,       SCREAMING_SNAKE_CASE__=16   ,       SCREAMING_SNAKE_CASE__=True   ,       SCREAMING_SNAKE_CASE__=10   ,       SCREAMING_SNAKE_CASE__=10   ,       SCREAMING_SNAKE_CASE__=10_24   ,       SCREAMING_SNAKE_CASE__=1_28   ,       **SCREAMING_SNAKE_CASE__   ,       )					->		Tuple:



											"""simple docstring"""




											super().__init__(**SCREAMING_SNAKE_CASE__    )

											SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   hidden_size
											SCREAMING_SNAKE_CASE__						:       str           =   num_hidden_layers
											SCREAMING_SNAKE_CASE__						:       int           =   num_attention_heads
											SCREAMING_SNAKE_CASE__						:       Tuple           =   intermediate_size
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   hidden_act
											SCREAMING_SNAKE_CASE__						:       Any           =   hidden_dropout_prob
											SCREAMING_SNAKE_CASE__						:       List[Any]           =   attention_probs_dropout_prob
											SCREAMING_SNAKE_CASE__						:       int           =   initializer_range
											SCREAMING_SNAKE_CASE__						:       int           =   layer_norm_eps
											SCREAMING_SNAKE_CASE__						:       Dict           =   patch_size
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   qkv_bias
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   frequency_stride
											SCREAMING_SNAKE_CASE__						:       Any           =   time_stride
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   max_length
											SCREAMING_SNAKE_CASE__						:       Any           =   num_mel_bins






import random






def 							_lowercase							(     UpperCamelCase_	,	UpperCamelCase_		)		->		tuple:
					'''simple docstring'''


					SCREAMING_SNAKE_CASE__						, SCREAMING_SNAKE_CASE__						, SCREAMING_SNAKE_CASE__													= [], [], []
					for element in data:
										if element < pivot:
															less.append(UpperCamelCase_		)
										elif element > pivot:
															greater.append(UpperCamelCase_		)
										else:
															equal.append(UpperCamelCase_		)
					return less, equal, greater






def 							_lowercase							(     UpperCamelCase_	,	UpperCamelCase_		)		->		Any:
					'''simple docstring'''


					if index >= len(UpperCamelCase_		) or index < 0:
										return None

					SCREAMING_SNAKE_CASE__													= items[random.randint(0	,	len(UpperCamelCase_		) - 1		)]
					SCREAMING_SNAKE_CASE__													= 0
					SCREAMING_SNAKE_CASE__						, SCREAMING_SNAKE_CASE__						, SCREAMING_SNAKE_CASE__													= _partition(UpperCamelCase_	,	UpperCamelCase_		)
					SCREAMING_SNAKE_CASE__													= len(UpperCamelCase_		)
					SCREAMING_SNAKE_CASE__													= len(UpperCamelCase_		)

					# index is the pivot
					if m <= index < m + count:
										return pivot
					# must be in smaller
					elif m > index:
										return quick_select(UpperCamelCase_	,	UpperCamelCase_		)
					# must be in larger
					else:
										return quick_select(UpperCamelCase_	,	index - (m + count)		)





