
"""simple docstring"""






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


lowerCamelCase__ :       Any						     =			{
    "albert-base-v1": "https://huggingface.co/albert-base-v1/resolve/main/config.json",
    "albert-large-v1": "https://huggingface.co/albert-large-v1/resolve/main/config.json",
    "albert-xlarge-v1": "https://huggingface.co/albert-xlarge-v1/resolve/main/config.json",
    "albert-xxlarge-v1": "https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json",
    "albert-base-v2": "https://huggingface.co/albert-base-v2/resolve/main/config.json",
    "albert-large-v2": "https://huggingface.co/albert-large-v2/resolve/main/config.json",
    "albert-xlarge-v2": "https://huggingface.co/albert-xlarge-v2/resolve/main/config.json",
    "albert-xxlarge-v2": "https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json",
}




class 				lowercase__(				_UpperCAmelCase   ):
	'''simple docstring'''

	UpperCamelCase				=  """albert"""





	def __init__(						self    :List[str]		, lowerCamelCase_    :Any=3_00_00		, lowerCamelCase_    :List[str]=1_28		, lowerCamelCase_    :Optional[Any]=40_96		, lowerCamelCase_    :int=12		, lowerCamelCase_    :Union[str, Any]=1		, lowerCamelCase_    :str=64		, lowerCamelCase_    :List[Any]=1_63_84		, lowerCamelCase_    :List[str]=1		, lowerCamelCase_    :Optional[Any]="gelu_new"		, lowerCamelCase_    :Any=0		, lowerCamelCase_    :Union[str, Any]=0		, lowerCamelCase_    :Optional[int]=5_12		, lowerCamelCase_    :str=2		, lowerCamelCase_    :str=0.0_2		, lowerCamelCase_    :Dict=1E-12		, lowerCamelCase_    :int=0.1		, lowerCamelCase_    :int="absolute"		, lowerCamelCase_    :str=0		, lowerCamelCase_    :Optional[Any]=2		, lowerCamelCase_    :str=3		, **lowerCamelCase_    :int		, )							->			List[str]:







			'''simple docstring'''




			super().__init__(pad_token_id=lowerCamelCase_		, bos_token_id=lowerCamelCase_		, eos_token_id=lowerCamelCase_		, **lowerCamelCase_					)

			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= vocab_size
			SCREAMING_SNAKE_CASE       :     str				= embedding_size
			SCREAMING_SNAKE_CASE       :     int				= hidden_size
			SCREAMING_SNAKE_CASE       :     str				= num_hidden_layers
			SCREAMING_SNAKE_CASE       :     Dict				= num_hidden_groups
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= num_attention_heads
			SCREAMING_SNAKE_CASE       :     Optional[int]				= inner_group_num
			SCREAMING_SNAKE_CASE       :     List[str]				= hidden_act
			SCREAMING_SNAKE_CASE       :     Dict				= intermediate_size
			SCREAMING_SNAKE_CASE       :     Dict				= hidden_dropout_prob
			SCREAMING_SNAKE_CASE       :     Optional[int]				= attention_probs_dropout_prob
			SCREAMING_SNAKE_CASE       :     str				= max_position_embeddings
			SCREAMING_SNAKE_CASE       :     List[str]				= type_vocab_size
			SCREAMING_SNAKE_CASE       :     Dict				= initializer_range
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= layer_norm_eps
			SCREAMING_SNAKE_CASE       :     Tuple				= classifier_dropout_prob
			SCREAMING_SNAKE_CASE       :     Optional[int]				= position_embedding_type





class 				lowercase__(				_UpperCAmelCase   ):
	'''simple docstring'''

	@property
	def   __lowerCAmelCase (						self    :Any					)							->			Mapping[str, Mapping[int, str]]:







			'''simple docstring'''




			if self.task == "multiple-choice":
					SCREAMING_SNAKE_CASE       :     List[str]				= {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
			else:
					SCREAMING_SNAKE_CASE       :     Optional[Any]				= {0: '''batch''', 1: '''sequence'''}
			return OrderedDict(
			    [
			        ('''input_ids''', dynamic_axis),
			        ('''attention_mask''', dynamic_axis),
			        ('''token_type_ids''', dynamic_axis),
			    ]					)







"""simple docstring"""






import math




class 				lowercase__:
	'''simple docstring'''

	def __init__(						self    :Union[str, Any]		, lowerCamelCase_    :List[str]=0					)							->			List[Any]:  # a graph with Node 0,1,...,N-1







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= n
			SCREAMING_SNAKE_CASE       :     List[Any]				= [
			    [math.inf for j in range(0		, lowerCamelCase_					)] for i in range(0		, lowerCamelCase_					)
			]  # adjacency matrix for weight
			SCREAMING_SNAKE_CASE       :     Any				= [
			    [math.inf for j in range(0		, lowerCamelCase_					)] for i in range(0		, lowerCamelCase_					)
			]  # dp[i][j] stores minimum distance from i to j





	def   __lowerCAmelCase (						self    :Dict		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Union[str, Any]					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[Any]				= w





	def   __lowerCAmelCase (						self    :str					)							->			Union[str, Any]:







			'''simple docstring'''




			for k in range(0		, self.n					):
					for i in range(0		, self.n					):
							for j in range(0		, self.n					):
									SCREAMING_SNAKE_CASE       :     List[str]				= min(self.dp[i][j]		, self.dp[i][k] + self.dp[k][j]					)







	def   __lowerCAmelCase (						self    :int		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Optional[int]					)							->			Optional[Any]:







			'''simple docstring'''




			return self.dp[u][v]


if __name__ == "__main__":
					lowerCamelCase__ :       Dict						     =			Graph(5)
					graph.add_edge(0, 2, 9)
					graph.add_edge(0, 4, 10)
					graph.add_edge(1, 3, 5)
					graph.add_edge(2, 3, 7)
					graph.add_edge(3, 0, 10)
					graph.add_edge(3, 1, 2)
					graph.add_edge(3, 2, 1)
					graph.add_edge(3, 4, 6)
					graph.add_edge(4, 1, 3)
					graph.add_edge(4, 2, 4)
					graph.add_edge(4, 3, 9)
					graph.floyd_warshall()
					graph.show_min(1, 4)
					graph.show_min(0, 3)





