



from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_lowercase				:					Dict     					=logging.get_logger(__name__)

_lowercase				:					Optional[Any]     					={
    """MBZUAI/swiftformer-xs""": """https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json""",
}
class lowerCAmelCase_       (   A_			):







	'''simple docstring'''




	A_       :     Any									=		'swiftformer'

	def __init__(	self   ,       lowerCamelCase=3   ,       lowerCamelCase=[3, 3, 6, 4]   ,       lowerCamelCase=[48, 56, 112, 220]   ,       lowerCamelCase=4   ,       lowerCamelCase=[True, True, True, True]   ,       lowerCamelCase="gelu"   ,       lowerCamelCase=3   ,       lowerCamelCase=2   ,       lowerCamelCase=1   ,       lowerCamelCase=0.0   ,       lowerCamelCase=True   ,       lowerCamelCase=1e-5   ,       lowerCamelCase=1e-5   ,       **lowerCamelCase   ,       ):



				'''simple docstring'''


				super().__init__(**lowerCamelCase       )
				a__					=  num_channels
				a__					=  depths
				a__					=  embed_dims
				a__					=  mlp_ratio
				a__					=  downsamples
				a__					=  hidden_act
				a__					=  down_patch_size
				a__					=  down_stride
				a__					=  down_pad
				a__					=  drop_path_rate
				a__					=  use_layer_scale
				a__					=  layer_scale_init_value
				a__					=  batch_norm_eps


class lowerCAmelCase_       (   A_			):







	'''simple docstring'''




	A_       :     Any									=		version.parse('1.11'			)

	@property
	def 				_A			(	self       ):



				'''simple docstring'''


				return OrderedDict(
				    [
				        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
				    ]       )







	@property
	def 				_A			(	self       ):



				'''simple docstring'''


				return 1e-4






def    UpperCAmelCase					(  lowercase__						:					List[Any]				,					lowercase__						:					Optional[int]	):



			'''simple docstring'''





			print("""\nVertex Distance"""	)
			for i in range(lowercase__	):
						if dist[i] != float("""inf"""	):
									print(lowercase__				,					"""\t"""				,					int(dist[i]	)				,					end="""\t"""	)
						else:
									print(lowercase__				,					"""\t"""				,					"""INF"""				,					end="""\t"""	)
						print()




def    UpperCAmelCase					(  lowercase__						:					Optional[int]				,					lowercase__						:					Any				,					lowercase__						:					Tuple	):



			'''simple docstring'''





			a__					=  float("""inf"""	)
			a__					=  -1
			for i in range(lowercase__	):
						if (not vset[i]) and mdist[i] < min_val:
									a__					=  i
									a__					=  mdist[i]
			return min_ind




def    UpperCAmelCase					(  lowercase__						:					Optional[Any]				,					lowercase__						:					Tuple				,					lowercase__						:					List[Any]	):



			'''simple docstring'''





			a__					=  [float("""inf"""	) for _ in range(lowercase__	)]
			a__					=  [False for _ in range(lowercase__	)]
			a__					=  0.0

			for _ in range(v - 1	):
						a__					=  min_dist(lowercase__				,					lowercase__				,					lowercase__	)
						a__					=  True

						for i in range(lowercase__	):
									if (
									    (not vset[i])
									    and graph[u][i] != float("""inf"""	)
									    and mdist[u] + graph[u][i] < mdist[i]
									):
												a__					=  mdist[u] + graph[u][i]

			print_dist(lowercase__				,					lowercase__	)


if __name__ == "__main__":
	_lowercase				:					Any     					=int(input("""Enter number of vertices: """).strip())
	_lowercase				:					List[str]     					=int(input("""Enter number of edges: """).strip())

	_lowercase				:					List[str]     					=[[float("""inf""") for i in range(V)] for j in range(V)]

	for i in range(V):
		_lowercase				:					Dict     					=0.0

	for i in range(E):
		print("""\nEdge """, i + 1)
		_lowercase				:					Dict     					=int(input("""Enter source:""").strip())
		_lowercase				:					Optional[Any]     					=int(input("""Enter destination:""").strip())
		_lowercase				:					List[Any]     					=float(input("""Enter weight:""").strip())
		_lowercase				:					List[str]     					=weight

	_lowercase				:					List[Any]     					=int(input("""\nEnter shortest path source:""").strip())
	dijkstra(graph, V, gsrc)

