
def     UpperCAmelCase_  (						__lowerCAmelCase	,					__lowerCAmelCase	) ->						List[str]:
    print('''\nThe shortest path matrix using Floyd Warshall algorithm\n'''	)
    for i in range(__lowerCAmelCase	):
        for j in range(__lowerCAmelCase	):
            if dist[i][j] != float('''inf'''	):
                print(int(dist[i][j]	)	,					end='''\t'''	)
            else:
                print('''INF'''	,					end='''\t'''	)
        print()


def     UpperCAmelCase_  (						__lowerCAmelCase	,					__lowerCAmelCase	) ->						Tuple:
    __lowercase		:			str	    =       [[float('''inf'''	) for _ in range(__lowerCAmelCase	)] for _ in range(__lowerCAmelCase	)]

    for i in range(__lowerCAmelCase	):
        for j in range(__lowerCAmelCase	):
            __lowercase		:			int	    =       graph[i][j]

            # check vertex k against all other vertices (i, j)
    for k in range(__lowerCAmelCase	):
        # looping through rows of graph array
        for i in range(__lowerCAmelCase	):
            # looping through columns of graph array
            for j in range(__lowerCAmelCase	):
                if (
                    dist[i][k] != float('''inf'''	)
                    and dist[k][j] != float('''inf'''	)
                    and dist[i][k] + dist[k][j] < dist[i][j]
                ):
                    __lowercase		:			Any	    =       dist[i][k] + dist[k][j]

    _print_dist(__lowerCAmelCase	,					__lowerCAmelCase	)
    return dist, v


if __name__ == "__main__":
      __lowerCAmelCase					:			Optional[int]			      =		int(input("Enter number of vertices: "))
      __lowerCAmelCase					:			Tuple			      =		int(input("Enter number of edges: "))

      __lowerCAmelCase					:			Any			      =		[[float("inf") for i in range(v)] for j in range(v)]

      for i in range(v):
            __lowerCAmelCase					:			List[Any]			      =		0.0

            # src and dst are indices that must be within the array size graph[e][v]
            # failure to follow this will result in an error
      for i in range(e):
            print("\nEdge ", i + 1)
            __lowerCAmelCase					:			List[Any]			      =		int(input("Enter source:"))
            __lowerCAmelCase					:			Optional[int]			      =		int(input("Enter destination:"))
            __lowerCAmelCase					:			str			      =		float(input("Enter weight:"))
            __lowerCAmelCase					:			Union[str, Any]			      =		weight

      floyd_warshall(graph, v)

      # Example Input
      # Enter number of vertices: 3
      # Enter number of edges: 2

      # # generated graph from vertex and edge inputs
      # [[inf, inf, inf], [inf, inf, inf], [inf, inf, inf]]
      # [[0.0, inf, inf], [inf, 0.0, inf], [inf, inf, 0.0]]

      # specify source, destination and weight for edge #1
      # Edge  1
      # Enter source:1
      # Enter destination:2
      # Enter weight:2

      # specify source, destination and weight for edge #2
      # Edge  2
      # Enter source:2
      # Enter destination:1
      # Enter weight:1

      # # Expected Output from the vertice, edge and src, dst, weight inputs!!
      # 0		INF	INF
      # INF	0	2
      # INF	1	0




import warnings
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


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

__lowerCAmelCase					:			Optional[int]			      =		{
    "nvidia/segformer-b0-finetuned-ade-512-512": (
        "https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512/resolve/main/config.json"
    ),
    # See all SegFormer models at https://huggingface.co/models?filter=segformer
}


class 						__lowerCAmelCase	(	lowerCAmelCase_      ):



      """simple docstring"""







      A__	:			Dict        =    '''segformer'''




      def __init__(      self		:       Optional[Any]				,       _snake_case		:       List[str]=3				,       _snake_case		:       Union[str, Any]=4				,       _snake_case		:       str=[2, 2, 2, 2]				,       _snake_case		:       Dict=[8, 4, 2, 1]				,       _snake_case		:       List[Any]=[32, 64, 160, 256]				,       _snake_case		:       Dict=[7, 3, 3, 3]				,       _snake_case		:       List[Any]=[4, 2, 2, 2]				,       _snake_case		:       Tuple=[1, 2, 5, 8]				,       _snake_case		:       Optional[Any]=[4, 4, 4, 4]				,       _snake_case		:       Optional[int]="gelu"				,       _snake_case		:       Optional[int]=0.0				,       _snake_case		:       Optional[int]=0.0				,       _snake_case		:       int=0.1				,       _snake_case		:       Any=0.02				,       _snake_case		:       Optional[int]=0.1				,       _snake_case		:       Union[str, Any]=1E-6				,       _snake_case		:       Tuple=256				,       _snake_case		:       str=255				,       **_snake_case		:       Any				,       ):
          super().__init__(**_snake_case				)

          if "reshape_last_stage" in kwargs and kwargs["reshape_last_stage"] is False:
              warnings.warn(
                  '''Reshape_last_stage is set to False in this config. This argument is deprecated and will soon be'''
                  ''' removed, as the behaviour will default to that of reshape_last_stage = True.'''				,       _snake_case				,       )

          __lowercase		:			Any	    =       num_channels
          __lowercase		:			Optional[Any]	    =       num_encoder_blocks
          __lowercase		:			List[str]	    =       depths
          __lowercase		:			str	    =       sr_ratios
          __lowercase		:			List[str]	    =       hidden_sizes
          __lowercase		:			List[str]	    =       patch_sizes
          __lowercase		:			Dict	    =       strides
          __lowercase		:			Optional[int]	    =       mlp_ratios
          __lowercase		:			List[str]	    =       num_attention_heads
          __lowercase		:			Optional[int]	    =       hidden_act
          __lowercase		:			List[Any]	    =       hidden_dropout_prob
          __lowercase		:			Optional[Any]	    =       attention_probs_dropout_prob
          __lowercase		:			List[Any]	    =       classifier_dropout_prob
          __lowercase		:			str	    =       initializer_range
          __lowercase		:			Optional[int]	    =       drop_path_rate
          __lowercase		:			List[str]	    =       layer_norm_eps
          __lowercase		:			List[str]	    =       decoder_hidden_size
          __lowercase		:			Union[str, Any]	    =       kwargs.get('''reshape_last_stage'''				,       _snake_case				)
          __lowercase		:			str	    =       semantic_loss_ignore_index






class 						__lowerCAmelCase	(	lowerCAmelCase_      ):



      """simple docstring"""







      A__	:			Union[str, Any]        =    version.parse('''1.11'''      )




      @property
      def 		snake_case_			(      self		:       Dict				):
          return OrderedDict(
              [
                  ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
              ]				)




      @property
      def 		snake_case_			(      self		:       int				):
          return 1E-4




      @property
      def 		snake_case_			(      self		:       List[Any]				):
          return 12


