





'''simple docstring'''




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


_A:					str							=				logging.get_logger(__name__)

_A:					Optional[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_							):
    _A :			str						   =       """audio-spectrogram-transformer"""



    def __init__(  self     ,			__A=768     ,			__A=12     ,			__A=12     ,			__A=3_072     ,			__A="gelu"     ,			__A=0.0     ,			__A=0.0     ,			__A=0.0_2     ,			__A=1E-12     ,			__A=16     ,			__A=True     ,			__A=10     ,			__A=10     ,			__A=1_024     ,			__A=128     ,			**__A     ,			):
     super().__init__(**__A					)

     __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					=   patch_size
     __UpperCAmelCase					=   qkv_bias
     __UpperCAmelCase					=   frequency_stride
     __UpperCAmelCase					=   time_stride
     __UpperCAmelCase					=   max_length
     __UpperCAmelCase					=   num_mel_bins












'''simple docstring'''




from __future__ import annotations







def _lowerCAmelCase     (      _lowerCAmelCase       ,    _lowerCAmelCase       ,    _lowerCAmelCase       ,    )->     tuple:
 if (electron_conc, hole_conc, intrinsic_conc).count(0    ) != 1:
  raise ValueError('You cannot supply more or less than 2 values'    )
 elif electron_conc < 0:
  raise ValueError('Electron concentration cannot be negative in a semiconductor'    )
 elif hole_conc < 0:
  raise ValueError('Hole concentration cannot be negative in a semiconductor'    )
 elif intrinsic_conc < 0:
  raise ValueError(
      'Intrinsic concentration cannot be negative in a semiconductor'    )
 elif electron_conc == 0:
  return (
      "electron_conc",
      intrinsic_conc**2 / hole_conc,
  )
 elif hole_conc == 0:
  return (
      "hole_conc",
      intrinsic_conc**2 / electron_conc,
  )
 elif intrinsic_conc == 0:
  return (
      "intrinsic_conc",
      (electron_conc * hole_conc) ** 0.5,
  )
 else:
  return (-1, -1)


if __name__ == "__main__":
    import doctest

    doctest.testmod()





