code: def compute_relative_difference(
      tensor_1: Any,
      tensor_2: Any,
      y: Any = None,
      eps: float = 1e-5,
  ) -> float:
      if y is not None:
          logger.debug(
              "Received a label for the precision computation. "
              "It will be ignored."
          )
  
      tensor_1, tensor_2 = map(convert_to_numpy, (tensor_1, tensor_2))
  
      assert tensor_1.shape == tensor_2.shape, (
          "The outputs of the original and optimized models have "
          "different shapes"
      )
  
      diff = np.abs(tensor_1 - tensor_2) / (
          np.maximum(np.abs(tensor_1), np.abs(tensor_2)) + eps
      )
      return float(np.mean(diff))
  
file_path: nebuly/optimization/nebullvm/nebullvm/operations/measures/utils.py
imports: import time
  from typing import Tuple, List, Union, Any
  import numpy
  from loguru import logger
  from nebullvm.config import ONNX_PROVIDERS
  from nebullvm.core.models import Device, DeviceType
  from nebullvm.operations.inference_learners.base import BaseInferenceLearner
  from nebullvm.optional_modules.tensorflow import tensorflow
  from nebullvm.optional_modules.torch import torch, Module
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.onnx import convert_to_numpy, get_input_names, get_output_names
label_desc: Use image node_id 5 for calling a global function with example usage: compute_relative_difference(tensor_1, tensor_2, y, eps) and returns: float