


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


__lowerCAmelCase		       =							logging.get_logger(__name__)

__lowerCAmelCase		       =							{
    '''weiweishi/roc-bert-base-zh''': '''https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json''',
}





class   __a			(    __UpperCamelCase      ):
 __lowercase :							Optional[Any]        = 'roc_bert'
 def __init__(   self				, lowerCAmelCase__=30_522				, lowerCAmelCase__=768				, lowerCAmelCase__=12				, lowerCAmelCase__=12				, lowerCAmelCase__=3_072				, lowerCAmelCase__="gelu"				, lowerCAmelCase__=0.1				, lowerCAmelCase__=0.1				, lowerCAmelCase__=512				, lowerCAmelCase__=2				, lowerCAmelCase__=0.0_2				, lowerCAmelCase__=1E-12				, lowerCAmelCase__=True				, lowerCAmelCase__=0				, lowerCAmelCase__="absolute"				, lowerCAmelCase__=None				, lowerCAmelCase__=True				, lowerCAmelCase__=True				, lowerCAmelCase__=768				, lowerCAmelCase__=910				, lowerCAmelCase__=512				, lowerCAmelCase__=24_858				, lowerCAmelCase__=True				, **lowerCAmelCase__				, )					->				List[str]:




        '''simple docstring'''
        lowercase__:   int  			=   vocab_size
        lowercase__:   Any  			=   max_position_embeddings
        lowercase__:   List[Any]  			=   hidden_size
        lowercase__:   str  			=   num_hidden_layers
        lowercase__:   Optional[int]  			=   num_attention_heads
        lowercase__:   int  			=   intermediate_size
        lowercase__:   List[str]  			=   hidden_act
        lowercase__:   Optional[Any]  			=   hidden_dropout_prob
        lowercase__:   Union[str, Any]  			=   attention_probs_dropout_prob
        lowercase__:   Optional[int]  			=   initializer_range
        lowercase__:   Tuple  			=   type_vocab_size
        lowercase__:   Tuple  			=   layer_norm_eps
        lowercase__:   List[Any]  			=   use_cache
        lowercase__:   int  			=   enable_pronunciation
        lowercase__:   str  			=   enable_shape
        lowercase__:   int  			=   pronunciation_embed_dim
        lowercase__:   List[Any]  			=   pronunciation_vocab_size
        lowercase__:   List[str]  			=   shape_embed_dim
        lowercase__:   str  			=   shape_vocab_size
        lowercase__:   Dict  			=   concat_input
        lowercase__:   str  			=   position_embedding_type
        lowercase__:   str  			=   classifier_dropout
        super().__init__(pad_token_id=lowerCAmelCase__				, **lowerCAmelCase__ )






import math




def    snake_case_     (  snake_case			,							snake_case     )  ->				float:
       return math.pow(snake_case			,							2     ) - a




def    snake_case_     (  snake_case     )  ->				float:
       return 2 * x




def    snake_case_     (  snake_case     )  ->				float:
       lowercase__:   Dict  			=   2.0

       while start <= a:
              lowercase__:   str  			=   math.pow(snake_case			,							2     )

       return start




def    snake_case_     (  snake_case			,							snake_case = 99_99			,							snake_case = 0.0_0_0_0_0_0_0_0_0_0_0_0_0_1     )  ->				float:

       if a < 0:
              raise ValueError('math domain error'     )

       lowercase__:   Tuple  			=   get_initial_point(snake_case     )

       for _ in range(snake_case     ):
              lowercase__:   List[Any]  			=   value
              lowercase__:   Any  			=   value - fx(snake_case			,							snake_case     ) / fx_derivative(snake_case     )
              if abs(prev_value - value     ) < tolerance:
                     return value

       return value


if __name__ == "__main__":
 from doctest import testmod

 testmod()


