'''simple docstring'''


import math

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


snake_case__					:      str					      =  logging.get_logger(__name__)

snake_case__					:      List[str]					      =  {
    '''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 					__SCREAMING_SNAKE_CASE						(	lowerCamelCase_	):







  '''simple docstring'''






  lowerCamelCase_		:Any						   =		'''data2vec-audio'''


  def __init__(			self				,		snake_case_=3_2				,		snake_case_=7_6_8				,		snake_case_=1_2				,		snake_case_=1_2				,		snake_case_=3_0_7_2				,		snake_case_="gelu"				,		snake_case_=0.1				,		snake_case_=0.1				,		snake_case_=0.1				,		snake_case_=0.0				,		snake_case_=0.1				,		snake_case_=0.1				,		snake_case_=0.02				,		snake_case_=1E-5				,		snake_case_="gelu"				,		snake_case_=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2)				,		snake_case_=(5, 2, 2, 2, 2, 2, 2)				,		snake_case_=(1_0, 3, 3, 3, 3, 2, 2)				,		snake_case_=False				,		snake_case_=1_6				,		snake_case_=1_9				,		snake_case_=5				,		snake_case_=0.05				,		snake_case_=1_0				,		snake_case_=2				,		snake_case_=0.0				,		snake_case_=1_0				,		snake_case_=0				,		snake_case_="sum"				,		snake_case_=False				,		snake_case_=False				,		snake_case_=2_5_6				,		snake_case_=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 1_5_0_0)				,		snake_case_=(5, 3, 3, 1, 1)				,		snake_case_=(1, 2, 3, 1, 1)				,		snake_case_=5_1_2				,		snake_case_=0				,		snake_case_=1				,		snake_case_=2				,		snake_case_=False				,		snake_case_=3				,		snake_case_=2				,		snake_case_=3				,		snake_case_=None				,		**snake_case_				,		):




       '''simple docstring'''

       super().__init__(**snake_case_				,		pad_token_id=snake_case_				,		bos_token_id=snake_case_				,		eos_token_id=snake_case_						)
       UpperCAmelCase_							:       Optional[int]       =				hidden_size
       UpperCAmelCase_							:       int       =				feat_extract_activation
       UpperCAmelCase_							:       Union[str, Any]       =				list(snake_case_						)
       UpperCAmelCase_							:       str       =				list(snake_case_						)
       UpperCAmelCase_							:       Any       =				list(snake_case_						)
       UpperCAmelCase_							:       str       =				conv_bias
       UpperCAmelCase_							:       Optional[Any]       =				num_conv_pos_embeddings
       UpperCAmelCase_							:       Optional[int]       =				num_conv_pos_embedding_groups
       UpperCAmelCase_							:       List[str]       =				conv_pos_kernel_size
       UpperCAmelCase_							:       Tuple       =				len(self.conv_dim						)
       UpperCAmelCase_							:       Optional[Any]       =				num_hidden_layers
       UpperCAmelCase_							:       Union[str, Any]       =				intermediate_size
       UpperCAmelCase_							:       List[str]       =				hidden_act
       UpperCAmelCase_							:       Optional[int]       =				num_attention_heads
       UpperCAmelCase_							:       Tuple       =				hidden_dropout
       UpperCAmelCase_							:       Tuple       =				attention_dropout
       UpperCAmelCase_							:       Union[str, Any]       =				activation_dropout
       UpperCAmelCase_							:       List[str]       =				feat_proj_dropout
       UpperCAmelCase_							:       List[Any]       =				final_dropout
       UpperCAmelCase_							:       Dict       =				layerdrop
       UpperCAmelCase_							:       List[str]       =				layer_norm_eps
       UpperCAmelCase_							:       List[str]       =				initializer_range
       UpperCAmelCase_							:       Tuple       =				vocab_size
       UpperCAmelCase_							:       Tuple       =				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
       UpperCAmelCase_							:       Dict       =				mask_time_prob
       UpperCAmelCase_							:       str       =				mask_time_length
       UpperCAmelCase_							:       str       =				mask_time_min_masks
       UpperCAmelCase_							:       str       =				mask_feature_prob
       UpperCAmelCase_							:       Union[str, Any]       =				mask_feature_length
       UpperCAmelCase_							:       Optional[int]       =				mask_feature_min_masks

       # ctc loss
       UpperCAmelCase_							:       Tuple       =				ctc_loss_reduction
       UpperCAmelCase_							:       Optional[int]       =				ctc_zero_infinity

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

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

       # XVector-specific parameters. Feel free to ignore for other classes.
       UpperCAmelCase_							:       List[Any]       =				list(snake_case_						)
       UpperCAmelCase_							:       List[Any]       =				list(snake_case_						)
       UpperCAmelCase_							:       Union[str, Any]       =				list(snake_case_						)
       UpperCAmelCase_							:       Dict       =				xvector_output_dim






  @property
  def _UpperCamelCase					(			self						):




       '''simple docstring'''

       return math.prod(self.conv_stride						)







'''simple docstring'''


def  _lowerCamelCase   (				lowerCamelCase_ :							int     ,					lowerCamelCase_ :							int       ):



     """simple docstring"""





     return int(input_a == input_a == 0       )


def  _lowerCamelCase   (				):



     """simple docstring"""





     print('Truth Table of NOR Gate:'       )
     print('|   Input 1   |  Input 2  | Output |'       )
     print(F'''|      0      |    0      |  {nor_gate(0     ,					0       )}     |'''       )
     print(F'''|      0      |    1      |  {nor_gate(0     ,					1       )}     |'''       )
     print(F'''|      1      |    0      |  {nor_gate(1     ,					0       )}     |'''       )
     print(F'''|      1      |    1      |  {nor_gate(1     ,					1       )}     |'''       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()






