






import math

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


lowerCamelCase__       		=  logging.get_logger(__name__)

lowerCamelCase__       		=  {
    """facebook/data2vec-base-960h""": """https://huggingface.co/facebook/data2vec-audio-base-960h/resolve/main/config.json""",
    # See all Data2VecAudio models at https://huggingface.co/models?filter=data2vec-audio
}




class       snake_case__ (				lowercase_):

       '''simple docstring'''
       lowerCamelCase				:					Optional[int]								=			"data2vec-audio"



       def __init__(				self      ,    a__=32      ,    a__=7_68      ,    a__=12      ,    a__=12      ,    a__=30_72      ,    a__="gelu"      ,    a__=0.1      ,    a__=0.1      ,    a__=0.1      ,    a__=0.0      ,    a__=0.1      ,    a__=0.1      ,    a__=0.02      ,    a__=1e-5      ,    a__="gelu"      ,    a__=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)      ,    a__=(5, 2, 2, 2, 2, 2, 2)      ,    a__=(10, 3, 3, 3, 3, 2, 2)      ,    a__=False      ,    a__=16      ,    a__=19      ,    a__=5      ,    a__=0.05      ,    a__=10      ,    a__=2      ,    a__=0.0      ,    a__=10      ,    a__=0      ,    a__="sum"      ,    a__=False      ,    a__=False      ,    a__=2_56      ,    a__=(5_12, 5_12, 5_12, 5_12, 15_00)      ,    a__=(5, 3, 3, 1, 1)      ,    a__=(1, 2, 3, 1, 1)      ,    a__=5_12      ,    a__=0      ,    a__=1      ,    a__=2      ,    a__=False      ,    a__=3      ,    a__=2      ,    a__=3      ,    a__=None      ,    **a__      ,    )			->   int:






            '''simple docstring'''





            super().__init__(**a__      ,    pad_token_id=a__      ,    bos_token_id=a__      ,    eos_token_id=a__     )
            __snake_case      :int 							=    hidden_size
            __snake_case      :Optional[Any] 							=    feat_extract_activation
            __snake_case      :str 							=    list(a__     )
            __snake_case      :str 							=    list(a__     )
            __snake_case      :Union[str, Any] 							=    list(a__     )
            __snake_case      :Optional[int] 							=    conv_bias
            __snake_case      :int 							=    num_conv_pos_embeddings
            __snake_case      :Tuple 							=    num_conv_pos_embedding_groups
            __snake_case      :List[Any] 							=    conv_pos_kernel_size
            __snake_case      :int 							=    len(self.conv_dim     )
            __snake_case      :Optional[int] 							=    num_hidden_layers
            __snake_case      :Union[str, Any] 							=    intermediate_size
            __snake_case      :Optional[int] 							=    hidden_act
            __snake_case      :Any 							=    num_attention_heads
            __snake_case      :str 							=    hidden_dropout
            __snake_case      :int 							=    attention_dropout
            __snake_case      :Optional[Any] 							=    activation_dropout
            __snake_case      :Optional[int] 							=    feat_proj_dropout
            __snake_case      :int 							=    final_dropout
            __snake_case      :Optional[Any] 							=    layerdrop
            __snake_case      :List[Any] 							=    layer_norm_eps
            __snake_case      :Optional[Any] 							=    initializer_range
            __snake_case      :Optional[Any] 							=    vocab_size
            __snake_case      :Optional[int] 							=    use_weighted_layer_sum

            if (
                (len(self.conv_stride     ) != self.num_feat_extract_layers)
                or (len(self.conv_kernel     ) != self.num_feat_extract_layers)
                or (len(self.conv_dim     ) != self.num_feat_extract_layers)
            ):
                 raise ValueError(
                     """Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="""
                     """ `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="""
                     F''' {len(self.conv_dim     )}`, `len(config.conv_stride) = {len(self.conv_stride     )}`,'''
                     F''' `len(config.conv_kernel) = {len(self.conv_kernel     )}`.'''     )

            # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
            __snake_case      :Optional[int] 							=    mask_time_prob
            __snake_case      :int 							=    mask_time_length
            __snake_case      :Any 							=    mask_time_min_masks
            __snake_case      :List[str] 							=    mask_feature_prob
            __snake_case      :Tuple 							=    mask_feature_length
            __snake_case      :Any 							=    mask_feature_min_masks

            # ctc loss
            __snake_case      :Optional[int] 							=    ctc_loss_reduction
            __snake_case      :List[str] 							=    ctc_zero_infinity

            # adapter
            __snake_case      :int 							=    add_adapter
            __snake_case      :Any 							=    adapter_kernel_size
            __snake_case      :Union[str, Any] 							=    adapter_stride
            __snake_case      :int 							=    num_adapter_layers
            __snake_case      :Optional[Any] 							=    output_hidden_size or hidden_size

            # SequenceClassification-specific parameter. Feel free to ignore for other classes.
            __snake_case      :Dict 							=    classifier_proj_size

            # XVector-specific parameters. Feel free to ignore for other classes.
            __snake_case      :Any 							=    list(a__     )
            __snake_case      :int 							=    list(a__     )
            __snake_case      :str 							=    list(a__     )
            __snake_case      :Tuple 							=    xvector_output_dim



       @property
       def        __lowercase    (				self     )			->   List[str]:






            '''simple docstring'''





            return math.prod(self.conv_stride     )










lowerCamelCase__       		=  8.3_1_4_4_5_9_8






def 	UpperCamelCase	(							snake_case__  : float						,snake_case__  : float	):




     '''simple docstring'''






     if temperature < 0:
          raise Exception("""Temperature cannot be less than 0 K"""	)
     if molar_mass <= 0:
          raise Exception("""Molar mass cannot be less than or equal to 0 kg/mol"""	)
     else:
          return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
     import doctest

     # run doctest
     doctest.testmod()

     # example
     lowerCamelCase__       		=  300
     lowerCamelCase__       		=  28
     lowerCamelCase__       		=  rms_speed_of_molecule(temperature, molar_mass)
     print(f'''Vrms of Nitrogen gas at 300 K is {vrms} m/s''')


