





"""simple docstring"""





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


_UpperCamelCase							=      logging.get_logger(__name__)

_UpperCamelCase							=      {
    'alibaba-damo/mgp-str-base': 'https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json',
}
class 		SCREAMING_SNAKE_CASE_							(    snake_case__   ):
				"""simple docstring"""
				__snake_case   :       List[Any]	 =		"""mgp-str"""




				def __init__(     self  :Optional[Any]						,    __lowercase  :Union[str, Any]=[32, 128]						,    __lowercase  :List[Any]=4						,    __lowercase  :int=3						,    __lowercase  :List[Any]=27						,    __lowercase  :Optional[int]=38						,    __lowercase  :int=5_0257						,    __lowercase  :Union[str, Any]=3_0522						,    __lowercase  :Optional[int]=768						,    __lowercase  :List[Any]=12						,    __lowercase  :Union[str, Any]=12						,    __lowercase  :Dict=4.0						,    __lowercase  :int=True						,    __lowercase  :str=False						,    __lowercase  :Optional[int]=1e-5						,    __lowercase  :int=0.0						,    __lowercase  :Any=0.0						,    __lowercase  :str=0.0						,    __lowercase  :Optional[Any]=False						,    __lowercase  :Dict=0.02						,    **__lowercase  :List[Any]						,    ):
											super().__init__(**__lowercase			)

											__lowerCamelCase      :      Union[str, Any]         =image_size
											__lowerCamelCase      :      Optional[Any]         =patch_size
											__lowerCamelCase      :      Optional[Any]         =num_channels
											__lowerCamelCase      :      List[Any]         =max_token_length
											__lowerCamelCase      :      Union[str, Any]         =num_character_labels
											__lowerCamelCase      :      Optional[int]         =num_bpe_labels
											__lowerCamelCase      :      Optional[int]         =num_wordpiece_labels
											__lowerCamelCase      :      Optional[int]         =hidden_size
											__lowerCamelCase      :      List[str]         =num_hidden_layers
											__lowerCamelCase      :      Dict         =num_attention_heads
											__lowerCamelCase      :      List[str]         =mlp_ratio
											__lowerCamelCase      :      str         =distilled
											__lowerCamelCase      :      Any         =layer_norm_eps
											__lowerCamelCase      :      Optional[Any]         =drop_rate
											__lowerCamelCase      :      int         =qkv_bias
											__lowerCamelCase      :      List[str]         =attn_drop_rate
											__lowerCamelCase      :      List[str]         =drop_path_rate
											__lowerCamelCase      :      List[Any]         =output_aa_attentions
											__lowerCamelCase      :      Any         =initializer_range











"""simple docstring"""





def 				lowerCAmelCase_			(      SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							int   ):


							'''simple docstring'''







							__lowerCamelCase      :      Optional[Any]         =len(SCREAMING_SNAKE_CASE   )
							__lowerCamelCase      :      Union[str, Any]         =[[0] * n for i in range(SCREAMING_SNAKE_CASE   )]
							for i in range(SCREAMING_SNAKE_CASE   ):
														__lowerCamelCase      :      Union[str, Any]         =y_points[i]

							for i in range(2    ,						SCREAMING_SNAKE_CASE   ):
														for j in range(SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE   ):
																					__lowerCamelCase      :      List[Any]         =(
																					    (xa - x_points[j - i + 1]) * q[j][i - 1]
																					    - (xa - x_points[j]) * q[j - 1][i - 1]
																					) / (x_points[j] - x_points[j - i + 1])

							return [q[n - 1][n - 1], q]


if __name__ == "__main__":
							import doctest

							doctest.testmod()




