
"""simple docstring"""
from typing import Optional, Union

import torch
from torch import nn
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from ...activations import ACTaFN
from ...modeling_outputs import BaseModelOutputWithPoolingAndNoAttention, ImageClassifierOutputWithNoAttention
from ...modeling_utils import PreTrainedModel
from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
from .configuration_mobilenet_va import MobileNetVaConfig


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


# General docstring
lowercase_       :						Dict     					=	'''MobileNetV1Config'''

# Base docstring
lowercase_       :						Union[str, Any]     					=	'''google/mobilenet_v1_1.0_224'''
lowercase_       :						Optional[Any]     					=	[1, 10_24, 7, 7]

# Image classification docstring
lowercase_       :						Optional[int]     					=	'''google/mobilenet_v1_1.0_224'''
lowercase_       :						Union[str, Any]     					=	'''tabby, tabby cat'''


lowercase_       :						Dict     					=	[
    '''google/mobilenet_v1_1.0_224''',
    '''google/mobilenet_v1_0.75_192''',
    # See all MobileNetV1 models at https://huggingface.co/models?filter=mobilenet_v1
]





def    _lowerCAmelCase    (     lowerCamelCase__							:							Any,						lowerCamelCase__							:							List[str],						lowerCamelCase__							:							Tuple=None				)  ->    Dict:
  _SCREAMING_SNAKE_CASE   :				Any							    = {}

  if isinstance(lowerCamelCase__,						lowerCamelCase__				):
    _SCREAMING_SNAKE_CASE   :				Tuple							    = model.mobilenet_va
  else:
    _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = model

  _SCREAMING_SNAKE_CASE   :				List[Any]							    = "MobilenetV1/Conv2d_0/"
  _SCREAMING_SNAKE_CASE   :				Tuple							    = backbone.conv_stem.convolution.weight
  _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = backbone.conv_stem.normalization.bias
  _SCREAMING_SNAKE_CASE   :				Dict							    = backbone.conv_stem.normalization.weight
  _SCREAMING_SNAKE_CASE   :				int							    = backbone.conv_stem.normalization.running_mean
  _SCREAMING_SNAKE_CASE   :				int							    = backbone.conv_stem.normalization.running_var

  for i in range(1_3				):
    _SCREAMING_SNAKE_CASE   :				int							    = i + 1
    _SCREAMING_SNAKE_CASE   :				str							    = i * 2

    _SCREAMING_SNAKE_CASE   :				Any							    = backbone.layer[pt_index]
    _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = f'''MobilenetV1/Conv2d_{tf_index}_depthwise/'''
    _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = pointer.convolution.weight
    _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = pointer.normalization.bias
    _SCREAMING_SNAKE_CASE   :				Any							    = pointer.normalization.weight
    _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = pointer.normalization.running_mean
    _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = pointer.normalization.running_var

    _SCREAMING_SNAKE_CASE   :				Optional[int]							    = backbone.layer[pt_index + 1]
    _SCREAMING_SNAKE_CASE   :				Optional[int]							    = f'''MobilenetV1/Conv2d_{tf_index}_pointwise/'''
    _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = pointer.convolution.weight
    _SCREAMING_SNAKE_CASE   :				int							    = pointer.normalization.bias
    _SCREAMING_SNAKE_CASE   :				Tuple							    = pointer.normalization.weight
    _SCREAMING_SNAKE_CASE   :				List[Any]							    = pointer.normalization.running_mean
    _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = pointer.normalization.running_var

  if isinstance(lowerCamelCase__,						lowerCamelCase__				):
    _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = "MobilenetV1/Logits/Conv2d_1c_1x1/"
    _SCREAMING_SNAKE_CASE   :				Dict							    = model.classifier.weight
    _SCREAMING_SNAKE_CASE   :				Optional[int]							    = model.classifier.bias

  return tf_to_pt_map





def    _lowerCAmelCase    (     lowerCamelCase__							:							Dict,						lowerCamelCase__							:							Optional[Any],						lowerCamelCase__							:							Union[str, Any]				)  ->    Any:
  try:
    import numpy as np
    import tensorflow as tf
  except ImportError:
    logger.error(
        "Loading a TensorFlow models in PyTorch, requires TensorFlow to be installed. Please see "
        "https://www.tensorflow.org/install/ for installation instructions."				)
    raise

  # Load weights from TF model
  _SCREAMING_SNAKE_CASE   :				Dict							    = tf.train.list_variables(lowerCamelCase__				)
  _SCREAMING_SNAKE_CASE   :				str							    = {}
  for name, shape in init_vars:
    logger.info(f'''Loading TF weight {name} with shape {shape}'''				)
    _SCREAMING_SNAKE_CASE   :				Dict							    = tf.train.load_variable(lowerCamelCase__,						lowerCamelCase__				)
    _SCREAMING_SNAKE_CASE   :				Any							    = array

  # Build TF to PyTorch weights loading map
  _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = _build_tf_to_pytorch_map(lowerCamelCase__,						lowerCamelCase__,						lowerCamelCase__				)

  for name, pointer in tf_to_pt_map.items():
    logger.info(f'''Importing {name}'''				)
    if name not in tf_weights:
      logger.info(f'''{name} not in tf pre-trained weights, skipping'''				)
      continue

    _SCREAMING_SNAKE_CASE   :				List[str]							    = tf_weights[name]

    if "depthwise_weights" in name:
      logger.info("Transposing depthwise"				)
      _SCREAMING_SNAKE_CASE   :				int							    = np.transpose(lowerCamelCase__,						(2, 3, 0, 1)				)
    elif "weights" in name:
      logger.info("Transposing"				)
      if len(pointer.shape				) == 2:  # copying into linear layer
        _SCREAMING_SNAKE_CASE   :				Any							    = array.squeeze().transpose()
      else:
        _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = np.transpose(lowerCamelCase__,						(3, 2, 0, 1)				)

    if pointer.shape != array.shape:
      raise ValueError(f'''Pointer shape {pointer.shape} and array shape {array.shape} mismatched'''				)

    logger.info(f'''Initialize PyTorch weight {name} {array.shape}'''				)
    _SCREAMING_SNAKE_CASE   :				List[str]							    = torch.from_numpy(lowerCamelCase__				)

    tf_weights.pop(lowerCamelCase__,						lowerCamelCase__				)
    tf_weights.pop(name + "/RMSProp",						lowerCamelCase__				)
    tf_weights.pop(name + "/RMSProp_1",						lowerCamelCase__				)
    tf_weights.pop(name + "/ExponentialMovingAverage",						lowerCamelCase__				)

  logger.info(f'''Weights not copied to PyTorch model: {", ".join(tf_weights.keys()				)}'''				)
  return model





def    _lowerCAmelCase    (     lowerCamelCase__							:							torch.Tensor,						lowerCamelCase__							:							nn.Convad				)  ->    torch.Tensor:
  _SCREAMING_SNAKE_CASE    ,		_SCREAMING_SNAKE_CASE   :				int							    = features.shape[-2:]
  _SCREAMING_SNAKE_CASE    ,		_SCREAMING_SNAKE_CASE   :				str							    = conv_layer.stride
  _SCREAMING_SNAKE_CASE    ,		_SCREAMING_SNAKE_CASE   :				Any							    = conv_layer.kernel_size

  if in_height % stride_height == 0:
    _SCREAMING_SNAKE_CASE   :				str							    = max(kernel_height - stride_height,						0				)
  else:
    _SCREAMING_SNAKE_CASE   :				str							    = max(kernel_height - (in_height % stride_height),						0				)

  if in_width % stride_width == 0:
    _SCREAMING_SNAKE_CASE   :				Any							    = max(kernel_width - stride_width,						0				)
  else:
    _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = max(kernel_width - (in_width % stride_width),						0				)

  _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = pad_along_width // 2
  _SCREAMING_SNAKE_CASE   :				Tuple							    = pad_along_width - pad_left
  _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = pad_along_height // 2
  _SCREAMING_SNAKE_CASE   :				str							    = pad_along_height - pad_top

  _SCREAMING_SNAKE_CASE   :				str							    = (pad_left, pad_right, pad_top, pad_bottom)
  return nn.functional.pad(lowerCamelCase__,						lowerCamelCase__,						"constant",						0.0				)
class 			UpperCamelCase      (							nn.Module  ):
     def __init__(     self  ,     snake_case__  ,     snake_case__  ,     snake_case__  ,     snake_case__  ,     snake_case__ = 1  ,     snake_case__ = 1  ,     snake_case__ = False  ,     snake_case__ = True  ,     snake_case__ = True  ,     ):




       """simple docstring"""


       super().__init__()
       _SCREAMING_SNAKE_CASE   :				Dict							    = config

       if in_channels % groups != 0:
         raise ValueError(F'''Input channels ({in_channels}) are not divisible by {groups} groups.'''				)
       if out_channels % groups != 0:
         raise ValueError(F'''Output channels ({out_channels}) are not divisible by {groups} groups.'''				)

       _SCREAMING_SNAKE_CASE   :				Optional[int]							    = 0 if config.tf_padding else int((kernel_size - 1) / 2				)

       _SCREAMING_SNAKE_CASE   :				Optional[int]							    = nn.Convad(
           in_channels=snake_case__  ,     out_channels=snake_case__  ,     kernel_size=snake_case__  ,     stride=snake_case__  ,     padding=snake_case__  ,     groups=snake_case__  ,     bias=snake_case__  ,     padding_mode="zeros"  ,     )

       if use_normalization:
         _SCREAMING_SNAKE_CASE   :				int							    = nn.BatchNormad(
             num_features=snake_case__  ,     eps=config.layer_norm_eps  ,     momentum=0.9_997  ,     affine=snake_case__  ,     track_running_stats=snake_case__  ,     )
       else:
         _SCREAMING_SNAKE_CASE   :				Optional[int]							    = None

       if use_activation:
         if isinstance(snake_case__  ,     snake_case__				):
           _SCREAMING_SNAKE_CASE   :				Dict							    = ACTaFN[use_activation]
         elif isinstance(config.hidden_act  ,     snake_case__				):
           _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = ACTaFN[config.hidden_act]
         else:
           _SCREAMING_SNAKE_CASE   :				Any							    = config.hidden_act
       else:
         _SCREAMING_SNAKE_CASE   :				Any							    = None




     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__				):




       """simple docstring"""


       if self.config.tf_padding:
         _SCREAMING_SNAKE_CASE   :				List[str]							    = apply_tf_padding(snake_case__  ,     self.convolution				)
       _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = self.convolution(snake_case__				)
       if self.normalization is not None:
         _SCREAMING_SNAKE_CASE   :				Dict							    = self.normalization(snake_case__				)
       if self.activation is not None:
         _SCREAMING_SNAKE_CASE   :				List[str]							    = self.activation(snake_case__				)
       return features
class 			UpperCamelCase      (							__SCREAMING_SNAKE_CASE  ):
     A__      =			MobileNetVaConfig
     A__      =			load_tf_weights_in_mobilenet_va
     A__      =			"""mobilenet_v1"""
     A__      =			"""pixel_values"""
     A__      =			False
     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__				):




       """simple docstring"""


       if isinstance(snake_case__  ,     (nn.Linear, nn.Convad)				):
         module.weight.data.normal_(mean=0.0  ,     std=self.config.initializer_range				)
         if module.bias is not None:
           module.bias.data.zero_()
       elif isinstance(snake_case__  ,     nn.BatchNormad				):
         module.bias.data.zero_()
         module.weight.data.fill_(1.0				)
lowercase_       :						Union[str, Any]     					=	R'''
    This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
    as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
    behavior.

    Parameters:
        config ([`MobileNetV1Config`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~PreTrainedModel.from_pretrained`] method to load the model weights.
'''

lowercase_       :						str     					=	R'''
    Args:
        pixel_values (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See
            [`MobileNetV1ImageProcessor.__call__`] for details.
        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
'''
@add_start_docstrings(
    """The bare MobileNetV1 model outputting raw hidden-states without any specific head on top."""      ,       __SCREAMING_SNAKE_CASE      ,       )
class 			UpperCamelCase      (							__SCREAMING_SNAKE_CASE  ):
     def __init__(     self  ,     snake_case__  ,     snake_case__ = True				):




       """simple docstring"""


       super().__init__(snake_case__				)
       _SCREAMING_SNAKE_CASE   :				Any							    = config

       _SCREAMING_SNAKE_CASE   :				int							    = 32
       _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = max(int(depth * config.depth_multiplier				)  ,     config.min_depth				)

       _SCREAMING_SNAKE_CASE   :				int							    = MobileNetVaConvLayer(
           snake_case__  ,     in_channels=config.num_channels  ,     out_channels=snake_case__  ,     kernel_size=3  ,     stride=2  ,     )

       _SCREAMING_SNAKE_CASE   :				int							    = [1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1]

       _SCREAMING_SNAKE_CASE   :				List[str]							    = nn.ModuleList()
       for i in range(13				):
         _SCREAMING_SNAKE_CASE   :				Dict							    = out_channels

         if strides[i] == 2 or i == 0:
           depth *= 2
           _SCREAMING_SNAKE_CASE   :				int							    = max(int(depth * config.depth_multiplier				)  ,     config.min_depth				)

         self.layer.append(
             MobileNetVaConvLayer(
                 snake_case__  ,     in_channels=snake_case__  ,     out_channels=snake_case__  ,     kernel_size=3  ,     stride=strides[i]  ,     groups=snake_case__  ,     )				)

         self.layer.append(
             MobileNetVaConvLayer(
                 snake_case__  ,     in_channels=snake_case__  ,     out_channels=snake_case__  ,     kernel_size=1  ,     )				)

       _SCREAMING_SNAKE_CASE   :				List[Any]							    = nn.AdaptiveAvgPoolad((1, 1)				) if add_pooling_layer else None

       # Initialize weights and apply final processing
       self.post_init()
     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__				):




       """simple docstring"""


       raise NotImplementedError




     @add_start_docstrings_to_model_forward(snake_case__				)
     @add_code_sample_docstrings(
         checkpoint=_CHECKPOINT_FOR_DOC  ,     output_type=snake_case__  ,     config_class=_CONFIG_FOR_DOC  ,     modality="vision"  ,     expected_output=_EXPECTED_OUTPUT_SHAPE  ,     )
     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__ = None  ,     snake_case__ = None  ,     snake_case__ = None  ,     ):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				int							    = (
           output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
       )
       _SCREAMING_SNAKE_CASE   :				Tuple							    = return_dict if return_dict is not None else self.config.use_return_dict

       if pixel_values is None:
         raise ValueError("You have to specify pixel_values"				)

       _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = self.conv_stem(snake_case__				)

       _SCREAMING_SNAKE_CASE   :				Dict							    = () if output_hidden_states else None

       for i, layer_module in enumerate(self.layer				):
         _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = layer_module(snake_case__				)

         if output_hidden_states:
           _SCREAMING_SNAKE_CASE   :				Tuple							    = all_hidden_states + (hidden_states,)

       _SCREAMING_SNAKE_CASE   :				Optional[int]							    = hidden_states

       if self.pooler is not None:
         _SCREAMING_SNAKE_CASE   :				List[str]							    = torch.flatten(self.pooler(snake_case__				)  ,     start_dim=1				)
       else:
         _SCREAMING_SNAKE_CASE   :				int							    = None

       if not return_dict:
         return tuple(v for v in [last_hidden_state, pooled_output, all_hidden_states] if v is not None				)

       return BaseModelOutputWithPoolingAndNoAttention(
           last_hidden_state=snake_case__  ,     pooler_output=snake_case__  ,     hidden_states=snake_case__  ,     )
@add_start_docstrings(
    """
    MobileNetV1 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
    ImageNet.
    """      ,       __SCREAMING_SNAKE_CASE      ,       )
class 			UpperCamelCase      (							__SCREAMING_SNAKE_CASE  ):
     def __init__(     self  ,     snake_case__				):




       """simple docstring"""


       super().__init__(snake_case__				)

       _SCREAMING_SNAKE_CASE   :				Dict							    = config.num_labels
       _SCREAMING_SNAKE_CASE   :				int							    = MobileNetVaModel(snake_case__				)

       _SCREAMING_SNAKE_CASE   :				int							    = self.mobilenet_va.layer[-1].convolution.out_channels

       # Classifier head
       _SCREAMING_SNAKE_CASE   :				Optional[int]							    = nn.Dropout(config.classifier_dropout_prob  ,     inplace=snake_case__				)
       _SCREAMING_SNAKE_CASE   :				List[Any]							    = nn.Linear(snake_case__  ,     config.num_labels				) if config.num_labels > 0 else nn.Identity()

       # Initialize weights and apply final processing
       self.post_init()




     @add_start_docstrings_to_model_forward(snake_case__				)
     @add_code_sample_docstrings(
         checkpoint=_IMAGE_CLASS_CHECKPOINT  ,     output_type=snake_case__  ,     config_class=_CONFIG_FOR_DOC  ,     expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT  ,     )
     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__ = None  ,     snake_case__ = None  ,     snake_case__ = None  ,     snake_case__ = None  ,     ):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				str							    = return_dict if return_dict is not None else self.config.use_return_dict

       _SCREAMING_SNAKE_CASE   :				List[Any]							    = self.mobilenet_va(snake_case__  ,     output_hidden_states=snake_case__  ,     return_dict=snake_case__				)

       _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = outputs.pooler_output if return_dict else outputs[1]

       _SCREAMING_SNAKE_CASE   :				int							    = self.classifier(self.dropout(snake_case__				)				)

       _SCREAMING_SNAKE_CASE   :				List[str]							    = None
       if labels is not None:
         if self.config.problem_type is None:
           if self.num_labels == 1:
             _SCREAMING_SNAKE_CASE   :				int							    = "regression"
           elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
             _SCREAMING_SNAKE_CASE   :				List[str]							    = "single_label_classification"
           else:
             _SCREAMING_SNAKE_CASE   :				Optional[int]							    = "multi_label_classification"

         if self.config.problem_type == "regression":
           _SCREAMING_SNAKE_CASE   :				Dict							    = MSELoss()
           if self.num_labels == 1:
             _SCREAMING_SNAKE_CASE   :				int							    = loss_fct(logits.squeeze()  ,     labels.squeeze()				)
           else:
             _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = loss_fct(snake_case__  ,     snake_case__				)
         elif self.config.problem_type == "single_label_classification":
           _SCREAMING_SNAKE_CASE   :				List[str]							    = CrossEntropyLoss()
           _SCREAMING_SNAKE_CASE   :				int							    = loss_fct(logits.view(-1  ,     self.num_labels				)  ,     labels.view(-1				)				)
         elif self.config.problem_type == "multi_label_classification":
           _SCREAMING_SNAKE_CASE   :				int							    = BCEWithLogitsLoss()
           _SCREAMING_SNAKE_CASE   :				Union[str, Any]							    = loss_fct(snake_case__  ,     snake_case__				)

       if not return_dict:
         _SCREAMING_SNAKE_CASE   :				Optional[int]							    = (logits,) + outputs[2:]
         return ((loss,) + output) if loss is not None else output

       return ImageClassifierOutputWithNoAttention(
           loss=snake_case__  ,     logits=snake_case__  ,     hidden_states=outputs.hidden_states  ,     )





"""simple docstring"""
def    _lowerCAmelCase    (     lowerCamelCase__							:							str,						lowerCamelCase__							:							str				)  ->    Union[str, Any]:
  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    _lowerCAmelCase    (     lowerCamelCase__							:							Dict,						lowerCamelCase__							:							Any				)  ->    List[str]:
  _SCREAMING_SNAKE_CASE   :				List[Any]							    = [[float("inf"				) for _ in range(lowerCamelCase__				)] for _ in range(lowerCamelCase__				)]

  for i in range(lowerCamelCase__				):
    for j in range(lowerCamelCase__				):
      _SCREAMING_SNAKE_CASE   :				List[Any]							    = 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]
        ):
          _SCREAMING_SNAKE_CASE   :				List[Any]							    = dist[i][k] + dist[k][j]

  _print_dist(lowerCamelCase__,						lowerCamelCase__				)
  return dist, v


if __name__ == "__main__":
      lowercase_       :						Tuple     					=	int(input('''Enter number of vertices: '''))
      lowercase_       :						List[Any]     					=	int(input('''Enter number of edges: '''))

      lowercase_       :						Optional[Any]     					=	[[float('''inf''') for i in range(v)] for j in range(v)]

      for i in range(v):
            lowercase_       :						Tuple     					=	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)
            lowercase_       :						str     					=	int(input('''Enter source:'''))
            lowercase_       :						Optional[Any]     					=	int(input('''Enter destination:'''))
            lowercase_       :						Union[str, Any]     					=	float(input('''Enter weight:'''))
            lowercase_       :						str     					=	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



