



'''simple docstring'''






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: Optional[int]							=						logging.get_logger(__name__)

lowerCAmelCase: Optional[int]							=						{
    '''google/mobilenet_v2_1.4_224''': '''https://huggingface.co/google/mobilenet_v2_1.4_224/resolve/main/config.json''',
    '''google/mobilenet_v2_1.0_224''': '''https://huggingface.co/google/mobilenet_v2_1.0_224/resolve/main/config.json''',
    '''google/mobilenet_v2_0.75_160''': '''https://huggingface.co/google/mobilenet_v2_0.75_160/resolve/main/config.json''',
    '''google/mobilenet_v2_0.35_96''': '''https://huggingface.co/google/mobilenet_v2_0.35_96/resolve/main/config.json''',
    # See all MobileNetV2 models at https://huggingface.co/models?filter=mobilenet_v2
}

class 							a__( _UpperCAmelCase     ):
    lowercase__			=   'mobilenet_v2'







    def __init__(				self			:  Dict						,      __snake_case			:  Any=3						,      __snake_case			:  Optional[int]=2_24						,      __snake_case			:  List[Any]=1.0						,      __snake_case			:  int=8						,      __snake_case			:  str=8						,      __snake_case			:  int=6						,      __snake_case			:  Optional[int]=32						,      __snake_case			:  List[Any]=True						,      __snake_case			:  Optional[int]=True						,      __snake_case			:  Tuple="relu6"						,      __snake_case			:  str=True						,      __snake_case			:  Union[str, Any]=0.8						,      __snake_case			:  Any=0.02						,      __snake_case			:  Optional[int]=0.001						,      __snake_case			:  Tuple=2_55						,      **__snake_case			:  Optional[Any]						,      ):
      super().__init__(**SCREAMING_SNAKE_CASE_     )

      if depth_multiplier <= 0:
        raise ValueError('depth_multiplier must be greater than zero.'     )

      a						: Dict					       =					num_channels
      a						: str					       =					image_size
      a						: List[str]					       =					depth_multiplier
      a						: Dict					       =					depth_divisible_by
      a						: int					       =					min_depth
      a						: Optional[int]					       =					expand_ratio
      a						: Any					       =					output_stride
      a						: Tuple					       =					first_layer_is_expansion
      a						: Optional[Any]					       =					finegrained_output
      a						: Dict					       =					hidden_act
      a						: Dict					       =					tf_padding
      a						: List[Any]					       =					classifier_dropout_prob
      a						: str					       =					initializer_range
      a						: Optional[int]					       =					layer_norm_eps
      a						: Tuple					       =					semantic_loss_ignore_index

class 							a__( _UpperCAmelCase     ):
    lowercase__			=   version.parse("""1.11"""     )







    @property
    def       lowercase_	(				self			:  str     ):
      return OrderedDict([('pixel_values', {0: 'batch'})]     )







    @property
    def       lowercase_	(				self			:  Optional[int]     ):
      if self.task == "image-classification":
        return OrderedDict([('logits', {0: 'batch'})]     )
      else:
        return OrderedDict([('last_hidden_state', {0: 'batch'}), ('pooler_output', {0: 'batch'})]     )







    @property
    def       lowercase_	(				self			:  List[Any]     ):
      return 1e-4







'''simple docstring'''






import math

class 							a__:







    def __init__(				self			:  int						,      __snake_case			:  Any=0     ):  # a graph with Node 0,1,...,N-1
      a						: List[Any]					       =					n
      a						: Optional[Any]					       =					[
          [math.inf for j in range(0						,      __snake_case     )] for i in range(0						,      __snake_case     )
      ]  # adjacency matrix for weight
      a						: Dict					       =					[
          [math.inf for j in range(0						,      __snake_case     )] for i in range(0						,      __snake_case     )
      ]  # dp[i][j] stores minimum distance from i to j







    def       lowercase_	(				self			:  int						,      __snake_case			:  str						,      __snake_case			:  Tuple						,      __snake_case			:  int     ):
      a						: str					       =					w







    def       lowercase_	(				self			:  int     ):
      for k in range(0						,      self.n     ):
        for i in range(0						,      self.n     ):
          for j in range(0						,      self.n     ):
            a						: str					       =					min(self.dp[i][j]						,      self.dp[i][k] + self.dp[k][j]     )







    def       lowercase_	(				self			:  List[str]						,      __snake_case			:  Any						,      __snake_case			:  List[str]     ):
      return self.dp[u][v]


if __name__ == "__main__":
     lowerCAmelCase: Any							=						Graph(5)
     graph.add_edge(0, 2, 9)
     graph.add_edge(0, 4, 1_0)
     graph.add_edge(1, 3, 5)
     graph.add_edge(2, 3, 7)
     graph.add_edge(3, 0, 1_0)
     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)