



import math

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


UpperCAmelCase__   =       logging.get_logger(__name__)

UpperCAmelCase__   =       {
    "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 			__lowerCAmelCase    (			__lowerCamelCase						):
			UpperCamelCase   					=     "data2vec-audio"



			def __init__(						self   :  Any ,		A   :  List[Any]=32 ,		A   :  Optional[int]=7_68 ,		A   :  Optional[Any]=12 ,		A   :  Optional[int]=12 ,		A   :  Optional[Any]=30_72 ,		A   :  str="gelu" ,		A   :  int=0.1 ,		A   :  int=0.1 ,		A   :  Union[str, Any]=0.1 ,		A   :  List[str]=0.0 ,		A   :  List[Any]=0.1 ,		A   :  Any=0.1 ,		A   :  List[str]=0.0_2 ,		A   :  List[str]=1E-5 ,		A   :  Optional[Any]="gelu" ,		A   :  Optional[int]=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12) ,		A   :  Optional[Any]=(5, 2, 2, 2, 2, 2, 2) ,		A   :  str=(10, 3, 3, 3, 3, 2, 2) ,		A   :  Tuple=False ,		A   :  Any=16 ,		A   :  List[str]=19 ,		A   :  Union[str, Any]=5 ,		A   :  Any=0.0_5 ,		A   :  Tuple=10 ,		A   :  Dict=2 ,		A   :  str=0.0 ,		A   :  List[str]=10 ,		A   :  Optional[Any]=0 ,		A   :  Tuple="sum" ,		A   :  List[str]=False ,		A   :  Any=False ,		A   :  Optional[Any]=2_56 ,		A   :  Optional[Any]=(5_12, 5_12, 5_12, 5_12, 15_00) ,		A   :  Tuple=(5, 3, 3, 1, 1) ,		A   :  int=(1, 2, 3, 1, 1) ,		A   :  int=5_12 ,		A   :  List[Any]=0 ,		A   :  Dict=1 ,		A   :  Union[str, Any]=2 ,		A   :  Union[str, Any]=False ,		A   :  Dict=3 ,		A   :  Dict=2 ,		A   :  Optional[Any]=3 ,		A   :  int=None ,		**A   :  int ,		)   ->    List[str]:



						"""simple docstring"""






						super().__init__(**A ,		pad_token_id=A ,		bos_token_id=A ,		eos_token_id=A)
						_UpperCAmelCase		       =   hidden_size
						_UpperCAmelCase		       =   feat_extract_activation
						_UpperCAmelCase		       =   list(A)
						_UpperCAmelCase		       =   list(A)
						_UpperCAmelCase		       =   list(A)
						_UpperCAmelCase		       =   conv_bias
						_UpperCAmelCase		       =   num_conv_pos_embeddings
						_UpperCAmelCase		       =   num_conv_pos_embedding_groups
						_UpperCAmelCase		       =   conv_pos_kernel_size
						_UpperCAmelCase		       =   len(self.conv_dim)
						_UpperCAmelCase		       =   num_hidden_layers
						_UpperCAmelCase		       =   intermediate_size
						_UpperCAmelCase		       =   hidden_act
						_UpperCAmelCase		       =   num_attention_heads
						_UpperCAmelCase		       =   hidden_dropout
						_UpperCAmelCase		       =   attention_dropout
						_UpperCAmelCase		       =   activation_dropout
						_UpperCAmelCase		       =   feat_proj_dropout
						_UpperCAmelCase		       =   final_dropout
						_UpperCAmelCase		       =   layerdrop
						_UpperCAmelCase		       =   layer_norm_eps
						_UpperCAmelCase		       =   initializer_range
						_UpperCAmelCase		       =   vocab_size
						_UpperCAmelCase		       =   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		       =   mask_time_prob
						_UpperCAmelCase		       =   mask_time_length
						_UpperCAmelCase		       =   mask_time_min_masks
						_UpperCAmelCase		       =   mask_feature_prob
						_UpperCAmelCase		       =   mask_feature_length
						_UpperCAmelCase		       =   mask_feature_min_masks

						# ctc loss
						_UpperCAmelCase		       =   ctc_loss_reduction
						_UpperCAmelCase		       =   ctc_zero_infinity

						# adapter
						_UpperCAmelCase		       =   add_adapter
						_UpperCAmelCase		       =   adapter_kernel_size
						_UpperCAmelCase		       =   adapter_stride
						_UpperCAmelCase		       =   num_adapter_layers
						_UpperCAmelCase		       =   output_hidden_size or hidden_size

						# SequenceClassification-specific parameter. Feel free to ignore for other classes.
						_UpperCAmelCase		       =   classifier_proj_size

						# XVector-specific parameters. Feel free to ignore for other classes.
						_UpperCAmelCase		       =   list(A)
						_UpperCAmelCase		       =   list(A)
						_UpperCAmelCase		       =   list(A)
						_UpperCAmelCase		       =   xvector_output_dim



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



						"""simple docstring"""






						return math.prod(self.conv_stride)







def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	bool:
    return str(__UpperCAmelCase      ) == str(__UpperCAmelCase      )[::-1]




def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	int:
    return int(__UpperCAmelCase      ) + int(str(__UpperCAmelCase      )[::-1]      )




def 		lowerCAmelCase_    (  __UpperCAmelCase:			int = 1_0000      )      ->	int:
    UpperCamelCase__							:				Optional[Any]          =      []
    for num in range(1		,   __UpperCAmelCase      ):
        UpperCamelCase__							:				str          =      0
        UpperCamelCase__							:				Any          =      num
        while iterations < 50:
            UpperCamelCase__							:				List[Any]          =      sum_reverse(__UpperCAmelCase      )
            iterations += 1
            if is_palindrome(__UpperCAmelCase      ):
                break
        else:
            lychrel_nums.append(__UpperCAmelCase      )
    return len(__UpperCAmelCase      )


if __name__ == "__main__":
  print(F'''{solution() = }''')

