"""simple docstring"""






from __future__ import annotations


def 			UpperCAmelCase__       (				lowerCAmelCase__     :list[float]					,		lowerCAmelCase__     :Optional[int]		) ->    List[Any]:
      '''simple docstring'''


      print(f'Vertex\tShortest Distance from vertex {src}'		)
      for i, d in enumerate(lowerCAmelCase__		):
            print(f'{i}\t\t{d}'		)


def 			UpperCAmelCase__       (				lowerCAmelCase__     :list[dict[str, int]]					,		lowerCAmelCase__     :list[float]					,		lowerCAmelCase__     :int		) ->    int:
      '''simple docstring'''


      for j in range(lowerCAmelCase__		):
            lowercase							,							lowercase							,							lowercase														=	(graph[j][k] for k in ["""src""", """dst""", """weight"""])
            if distance[u] != float("""inf"""		) and distance[u] + w < distance[v]:
                  return True
      return False


def 			UpperCAmelCase__       (				lowerCAmelCase__     :list[dict[str, int]]					,		lowerCAmelCase__     :int					,		lowerCAmelCase__     :int					,		lowerCAmelCase__     :int		) ->    list[float]:
      '''simple docstring'''


      lowercase														=	[float("""inf"""		)] * vertex_count
      lowercase														=	0.0

      for _ in range(vertex_count - 1		):
            for j in range(lowerCAmelCase__		):
                  lowercase							,							lowercase							,							lowercase														=	(graph[j][k] for k in ["""src""", """dst""", """weight"""])

                  if distance[u] != float("""inf"""		) and distance[u] + w < distance[v]:
                        lowercase														=	distance[u] + w

      lowercase														=	check_negative_cycle(lowerCAmelCase__					,		lowerCAmelCase__					,		lowerCAmelCase__		)
      if negative_cycle_exists:
            raise Exception("""Negative cycle found"""		)

      return distance


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       __lowerCAmelCase    :       Union[str, Any]					     =int(input("""Enter number of vertices: """).strip())
       __lowerCAmelCase    :       Any					     =int(input("""Enter number of edges: """).strip())

       __lowerCAmelCase    :       list[dict[str, int]]					     =[{} for _ in range(E)]

       for i in range(E):
              print("""Edge """, i + 1)
              __lowerCAmelCase     ,     __lowerCAmelCase     ,     __lowerCAmelCase    :       List[Any]					     =(
                  int(x)
                  for x in input("""Enter source, destination, weight: """).strip().split(""" """)
              )
              __lowerCAmelCase    :       Any					     ={"""src""": src, """dst""": dest, """weight""": weight}

       __lowerCAmelCase    :       List[Any]					     =int(input("""\nEnter shortest path source:""").strip())
       __lowerCAmelCase    :       Tuple					     =bellman_ford(graph, V, E, source)
       print_distance(shortest_distance, 0)




"""simple docstring"""






from collections import OrderedDict
from typing import List, Mapping

from packaging import version

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


__lowerCAmelCase    :       List[Any]					     =logging.get_logger(__name__)

__lowerCAmelCase    :       Union[str, Any]					     ={
    """google/efficientnet-b7""": """https://huggingface.co/google/efficientnet-b7/resolve/main/config.json""",
}





class  _A						(       lowerCAmelCase	):
      snake_case__			:   Optional[int]							  =	'efficientnet'

      def __init__(						self		,       __lowerCAmelCase = 3		,       __lowerCAmelCase = 600		,       __lowerCAmelCase = 2.0		,       __lowerCAmelCase = 3.1		,       __lowerCAmelCase = 8		,       __lowerCAmelCase = [3, 3, 5, 3, 5, 5, 3]		,       __lowerCAmelCase = [32, 16, 24, 40, 80, 112, 192]		,       __lowerCAmelCase = [16, 24, 40, 80, 112, 192, 320]		,       __lowerCAmelCase = []		,       __lowerCAmelCase = [1, 2, 2, 2, 1, 2, 1]		,       __lowerCAmelCase = [1, 2, 2, 3, 3, 4, 1]		,       __lowerCAmelCase = [1, 6, 6, 6, 6, 6, 6]		,       __lowerCAmelCase = 0.2_5		,       __lowerCAmelCase = "swish"		,       __lowerCAmelCase = 2560		,       __lowerCAmelCase = "mean"		,       __lowerCAmelCase = 0.0_2		,       __lowerCAmelCase = 0.0_0_1		,       __lowerCAmelCase = 0.9_9		,       __lowerCAmelCase = 0.5		,       __lowerCAmelCase = 0.2		,       **__lowerCAmelCase		,       ):







            """simple docstring"""



            super().__init__(**__lowerCAmelCase						)

            lowercase														=	num_channels
            lowercase														=	image_size
            lowercase														=	width_coefficient
            lowercase														=	depth_coefficient
            lowercase														=	depth_divisor
            lowercase														=	kernel_sizes
            lowercase														=	in_channels
            lowercase														=	out_channels
            lowercase														=	depthwise_padding
            lowercase														=	strides
            lowercase														=	num_block_repeats
            lowercase														=	expand_ratios
            lowercase														=	squeeze_expansion_ratio
            lowercase														=	hidden_act
            lowercase														=	hidden_dim
            lowercase														=	pooling_type
            lowercase														=	initializer_range
            lowercase														=	batch_norm_eps
            lowercase														=	batch_norm_momentum
            lowercase														=	dropout_rate
            lowercase														=	drop_connect_rate
            lowercase														=	sum(__lowerCAmelCase						) * 4






class  _A						(       lowerCAmelCase	):
      snake_case__			:   Dict							  =	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-5



