




import functools
import operator

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


lowercase_		=							logging.get_logger(__name__)

lowercase_		=							{
    '''facebook/hubert-base-ls960''': '''https://huggingface.co/facebook/hubert-base-ls960/resolve/main/config.json''',
    # See all Hubert models at https://huggingface.co/models?filter=hubert
}





class 		A__				(   __SCREAMING_SNAKE_CASE ):
	lowerCamelCase__		: List[str]				    ="hubert"






	def __init__(	self				,     lowerCamelCase=32				,     lowerCamelCase=768				,     lowerCamelCase=12				,     lowerCamelCase=12				,     lowerCamelCase=3072				,     lowerCamelCase="gelu"				,     lowerCamelCase=0.1				,     lowerCamelCase=0.1				,     lowerCamelCase=0.1				,     lowerCamelCase=True				,     lowerCamelCase=0.0				,     lowerCamelCase=0.1				,     lowerCamelCase=0.1				,     lowerCamelCase=0.0_2				,     lowerCamelCase=1e-5				,     lowerCamelCase="group"				,     lowerCamelCase="gelu"				,     lowerCamelCase=(512, 512, 512, 512, 512, 512, 512)				,     lowerCamelCase=(5, 2, 2, 2, 2, 2, 2)				,     lowerCamelCase=(10, 3, 3, 3, 3, 2, 2)				,     lowerCamelCase=False				,     lowerCamelCase=128				,     lowerCamelCase=16				,     lowerCamelCase=False				,     lowerCamelCase=True				,     lowerCamelCase=0.0_5				,     lowerCamelCase=10				,     lowerCamelCase=2				,     lowerCamelCase=0.0				,     lowerCamelCase=10				,     lowerCamelCase=0				,     lowerCamelCase="sum"				,     lowerCamelCase=False				,     lowerCamelCase=False				,     lowerCamelCase=256				,     lowerCamelCase=0				,     lowerCamelCase=1				,     lowerCamelCase=2				,     **lowerCamelCase				,     )      ->   Union[str, Any]:




						"""simple docstring"""






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

						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
						__magic_name__					:							Any		   =							apply_spec_augment
						__magic_name__					:							int		   =							mask_time_prob
						__magic_name__					:							List[str]		   =							mask_time_length
						__magic_name__					:							List[Any]		   =							mask_time_min_masks
						__magic_name__					:							Union[str, Any]		   =							mask_feature_prob
						__magic_name__					:							List[str]		   =							mask_feature_length
						__magic_name__					:							Optional[int]		   =							mask_feature_min_masks

						# ctc loss
						__magic_name__					:							int		   =							ctc_loss_reduction
						__magic_name__					:							str		   =							ctc_zero_infinity






	@property
	def  lowercase      (	self						)      ->   Optional[Any]:




						"""simple docstring"""






						return functools.reduce(operator.mul				,     self.conv_stride				,     1						)









def  lowerCAmelCase  (	UpperCAmelCase       )  ->int:






					"""simple docstring"""






					return n * (2 * n - 1)







def  lowerCAmelCase  (	UpperCAmelCase       )  ->bool:






					"""simple docstring"""






					__magic_name__					:							Any		   =							(1 + 24 * n) ** 0.5
					return ((1 + root) / 6) % 1 == 0







def  lowerCAmelCase  (	UpperCAmelCase = 144       )  ->int:






					"""simple docstring"""






					__magic_name__					:							Optional[int]		   =							start
					__magic_name__					:							int		   =							hexagonal_num(UpperCAmelCase       )
					while not is_pentagonal(UpperCAmelCase       ):
										n += 1
										__magic_name__					:							Optional[int]		   =							hexagonal_num(UpperCAmelCase       )
					return num


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



