



'''simple docstring'''






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


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

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

class 				a__(   lowerCamelCase__      ):
    lowercase__					=       """audio-spectrogram-transformer"""







    def __init__( self					:    List[Any]		,     __snake_case					:    Optional[int]=7_68		,     __snake_case					:    List[Any]=12		,     __snake_case					:    Any=12		,     __snake_case					:    Dict=30_72		,     __snake_case					:    Optional[int]="gelu"		,     __snake_case					:    Any=0.0		,     __snake_case					:    Optional[Any]=0.0		,     __snake_case					:    Optional[int]=0.02		,     __snake_case					:    str=1e-1_2		,     __snake_case					:    int=16		,     __snake_case					:    Optional[int]=True		,     __snake_case					:    Tuple=10		,     __snake_case					:    str=10		,     __snake_case					:    Optional[int]=10_24		,     __snake_case					:    Dict=1_28		,     **__snake_case					:    Optional[int]		,     ):
      super().__init__(**__snake_case      )

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




'''simple docstring'''






from __future__ import annotations
def  lowerCamelCase__			(		_A					,     _A					,     _A							):
  a		:   List[str]	  =	list(range(len(_A							)							)							)
  a		:   Union[str, Any]	  =	[v / w for v, w in zip(_A					,     _A							)]
  index.sort(key=lambda _A							: ratio[i]					,     reverse=_A							)

  a		:   float	  =	0
  a		:   list[float]	  =	[0] * len(_A							)
  for i in index:
    if weight[i] <= capacity:
      a		:   int	  =	1
      max_value += value[i]
      capacity -= weight[i]
    else:
      a		:   Optional[int]	  =	capacity / weight[i]
      max_value += value[i] * capacity / weight[i]
      break

  return max_value, fractions


if __name__ == "__main__":
     import doctest

     doctest.testmod()