

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


lowerCAmelCase							:  Union[str, Any]   	=						logging.get_logger(__name__)

lowerCAmelCase							:  List[str]   	=						{
    """speechbrain/m-ctc-t-large""": """https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json""",
    # See all M-CTC-T models at https://huggingface.co/models?filter=mctct
}



class   __lowercase				( UpperCAmelCase_	):




			"""simple docstring"""







			_UpperCAmelCase   :							int										=     '''mctct'''



			def __init__( self  :     Optional[Any]   ,						lowerCAmelCase__  :     List[Any]=8065   ,						lowerCAmelCase__  :     int=1536   ,						lowerCAmelCase__  :     Tuple=36   ,						lowerCAmelCase__  :     str=6144   ,						lowerCAmelCase__  :     Optional[Any]=4   ,						lowerCAmelCase__  :     List[Any]=384   ,						lowerCAmelCase__  :     Dict=920   ,						lowerCAmelCase__  :     Any=1E-5   ,						lowerCAmelCase__  :     Dict=0.3   ,						lowerCAmelCase__  :     Tuple="relu"   ,						lowerCAmelCase__  :     int=0.02   ,						lowerCAmelCase__  :     List[str]=0.3   ,						lowerCAmelCase__  :     Any=0.3   ,						lowerCAmelCase__  :     Tuple=1   ,						lowerCAmelCase__  :     List[Any]=0   ,						lowerCAmelCase__  :     Union[str, Any]=2   ,						lowerCAmelCase__  :     Optional[Any]=1   ,						lowerCAmelCase__  :     Optional[Any]=0.3   ,						lowerCAmelCase__  :     str=1   ,						lowerCAmelCase__  :     Union[str, Any]=(7,)   ,						lowerCAmelCase__  :     Dict=(3,)   ,						lowerCAmelCase__  :     Optional[int]=80   ,						lowerCAmelCase__  :     Any=1   ,						lowerCAmelCase__  :     Dict=None   ,						lowerCAmelCase__  :     Dict="sum"   ,						lowerCAmelCase__  :     Any=False   ,						**lowerCAmelCase__  :     Any   ,						):
									super().__init__(**lowerCAmelCase__   ,						pad_token_id=lowerCAmelCase__   ,						bos_token_id=lowerCAmelCase__   ,						eos_token_id=lowerCAmelCase__)
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       vocab_size
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       hidden_size
									SCREAMING_SNAKE_CASE_: List[str]  		=       num_hidden_layers
									SCREAMING_SNAKE_CASE_: Dict  		=       intermediate_size
									SCREAMING_SNAKE_CASE_: int  		=       num_attention_heads
									SCREAMING_SNAKE_CASE_: Optional[Any]  		=       attention_head_dim
									SCREAMING_SNAKE_CASE_: str  		=       max_position_embeddings
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       layer_norm_eps
									SCREAMING_SNAKE_CASE_: Optional[Any]  		=       layerdrop
									SCREAMING_SNAKE_CASE_: int  		=       hidden_act
									SCREAMING_SNAKE_CASE_: Tuple  		=       initializer_range
									SCREAMING_SNAKE_CASE_: List[Any]  		=       hidden_dropout_prob
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_: str  		=       pad_token_id
									SCREAMING_SNAKE_CASE_: str  		=       bos_token_id
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       eos_token_id
									SCREAMING_SNAKE_CASE_: Tuple  		=       conv_glu_dim
									SCREAMING_SNAKE_CASE_: List[Any]  		=       conv_dropout
									SCREAMING_SNAKE_CASE_: List[str]  		=       num_conv_layers
									SCREAMING_SNAKE_CASE_: List[Any]  		=       input_feat_per_channel
									SCREAMING_SNAKE_CASE_: Dict  		=       input_channels
									SCREAMING_SNAKE_CASE_: str  		=       conv_channels
									SCREAMING_SNAKE_CASE_: Union[str, Any]  		=       ctc_loss_reduction
									SCREAMING_SNAKE_CASE_: Union[str, Any]  		=       ctc_zero_infinity

									# prevents config testing fail with exporting to json
									SCREAMING_SNAKE_CASE_: Union[str, Any]  		=       list(lowerCAmelCase__)
									SCREAMING_SNAKE_CASE_: int  		=       list(lowerCAmelCase__)

									if len(self.conv_kernel) != self.num_conv_layers:
															raise ValueError(
															    "Configuration for convolutional module is incorrect. "
															    "It is required that `len(config.conv_kernel)` == `config.num_conv_layers` "
															    F"but is `len(config.conv_kernel) = {len(self.conv_kernel)}`, "
															    F"`config.num_conv_layers = {self.num_conv_layers}`.")









import math
import sys







def 			A_      (    _UpperCAmelCase    ):
						if number != int(_UpperCAmelCase    ):
												raise ValueError("the value of input must be a natural number"    )
						if number < 0:
												raise ValueError("the value of input must not be a negative number"    )
						if number == 0:
												return 1
						SCREAMING_SNAKE_CASE_: List[str]  		=       [-1] * (number + 1)
						SCREAMING_SNAKE_CASE_: str  		=       0
						for i in range(1				,	number + 1    ):
												SCREAMING_SNAKE_CASE_: str  		=       sys.maxsize
												SCREAMING_SNAKE_CASE_: List[Any]  		=       int(math.sqrt(_UpperCAmelCase    )    )
												for j in range(1				,	root + 1    ):
																		SCREAMING_SNAKE_CASE_: List[str]  		=       1 + answers[i - (j**2)]
																		SCREAMING_SNAKE_CASE_: Optional[Any]  		=       min(_UpperCAmelCase				,	_UpperCAmelCase    )
												SCREAMING_SNAKE_CASE_: Dict  		=       answer
						return answers[number]


if __name__ == "__main__":
						import doctest

						doctest.testmod()






