






'''simple docstring'''

import functools
import operator

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


A:   Optional[int]						=					logging.get_logger(__name__)

A:   Dict						=					{
    "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 				__magic_name__  (						UpperCAmelCase_					):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_       :   Optional[Any]   =	'hubert'
	def __init__(				self	,   _lowercase=32	,   _lowercase=768	,   _lowercase=12	,   _lowercase=12	,   _lowercase=3072	,   _lowercase="gelu"	,   _lowercase=0.1	,   _lowercase=0.1	,   _lowercase=0.1	,   _lowercase=True	,   _lowercase=0.0	,   _lowercase=0.1	,   _lowercase=0.1	,   _lowercase=0.02	,   _lowercase=1E-5	,   _lowercase="group"	,   _lowercase="gelu"	,   _lowercase=(512, 512, 512, 512, 512, 512, 512)	,   _lowercase=(5, 2, 2, 2, 2, 2, 2)	,   _lowercase=(10, 3, 3, 3, 3, 2, 2)	,   _lowercase=False	,   _lowercase=128	,   _lowercase=16	,   _lowercase=False	,   _lowercase=True	,   _lowercase=0.05	,   _lowercase=10	,   _lowercase=2	,   _lowercase=0.0	,   _lowercase=10	,   _lowercase=0	,   _lowercase="sum"	,   _lowercase=False	,   _lowercase=False	,   _lowercase=256	,   _lowercase=0	,   _lowercase=1	,   _lowercase=2	,   **_lowercase	,   )    ->	Tuple:
							super().__init__(**__SCREAMING_SNAKE_CASE	,   pad_token_id=__SCREAMING_SNAKE_CASE	,   bos_token_id=__SCREAMING_SNAKE_CASE	,   eos_token_id=__SCREAMING_SNAKE_CASE							)
							lowercase_   : List[Any]   	=      hidden_size
							lowercase_   : int   	=      feat_extract_norm
							lowercase_   : Tuple   	=      feat_extract_activation
							lowercase_   : int   	=      list(__SCREAMING_SNAKE_CASE							)
							lowercase_   : Tuple   	=      list(__SCREAMING_SNAKE_CASE							)
							lowercase_   : List[str]   	=      list(__SCREAMING_SNAKE_CASE							)
							lowercase_   : Any   	=      conv_bias
							lowercase_   : Tuple   	=      num_conv_pos_embeddings
							lowercase_   : Union[str, Any]   	=      num_conv_pos_embedding_groups
							lowercase_   : Optional[int]   	=      len(self.conv_dim							)
							lowercase_   : Dict   	=      num_hidden_layers
							lowercase_   : Tuple   	=      intermediate_size
							lowercase_   : Optional[Any]   	=      hidden_act
							lowercase_   : Any   	=      num_attention_heads
							lowercase_   : Union[str, Any]   	=      hidden_dropout
							lowercase_   : List[str]   	=      attention_dropout
							lowercase_   : Optional[Any]   	=      activation_dropout
							lowercase_   : Optional[Any]   	=      feat_proj_layer_norm
							lowercase_   : str   	=      feat_proj_dropout
							lowercase_   : List[str]   	=      final_dropout
							lowercase_   : Tuple   	=      layerdrop
							lowercase_   : List[Any]   	=      layer_norm_eps
							lowercase_   : Dict   	=      initializer_range
							lowercase_   : int   	=      vocab_size
							lowercase_   : Optional[int]   	=      do_stable_layer_norm
							lowercase_   : Tuple   	=      use_weighted_layer_sum
							lowercase_   : Union[str, 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
							lowercase_   : Dict   	=      apply_spec_augment
							lowercase_   : Tuple   	=      mask_time_prob
							lowercase_   : int   	=      mask_time_length
							lowercase_   : Any   	=      mask_time_min_masks
							lowercase_   : Any   	=      mask_feature_prob
							lowercase_   : Optional[int]   	=      mask_feature_length
							lowercase_   : List[Any]   	=      mask_feature_min_masks

							# ctc loss
							lowercase_   : List[str]   	=      ctc_loss_reduction
							lowercase_   : List[str]   	=      ctc_zero_infinity







	@property
	def 							lowerCamelCase__		(				self							)    ->	Union[str, Any]:
							return functools.reduce(operator.mul	,   self.conv_stride	,   1							)


'''simple docstring'''

def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	int							)       ->	int:
 if number != int(snake_case_							):
  raise ValueError('factorial() only accepts integral values'							)
 if number < 0:
  raise ValueError('factorial() not defined for negative values'							)
 SCREAMING_SNAKE_CASE  :  str								=		1
 for i in range(1   ,     number + 1							):
  value *= i
 return value



def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	int							)       ->	int:
 if not isinstance(snake_case_   ,     snake_case_							):
  raise ValueError('factorial() only accepts integral values'							)
 if n < 0:
  raise ValueError('factorial() not defined for negative values'							)
 return 1 if n == 0 or n == 1 else n * factorial(n - 1							)


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   __UpperCAmelCase												=   int(input('Enter a positive integer: ').strip() or 0)
   print(f"""factorial{n} is {factorial(n)}""")


