code: def huber_loss(
      input: np.ndarray,
      target: np.ndarray,
      /,
      *,
      delta: Optional[float] = 1.0,
      reduction: Optional[str] = "mean",
  ) -> np.ndarray:
      abs_diff = np.abs(input - target)
      quadratic_loss = 0.5 * (abs_diff**2)
      linear_loss = delta * (abs_diff - 0.5 * delta)
      loss = np.where(abs_diff <= delta, quadratic_loss, linear_loss)
  
      if reduction == "sum":
          return np.sum(loss)
      elif reduction == "mean":
          return np.mean(loss)
      else:
          return loss
  
file_path: ivy/ivy/functional/backends/numpy/experimental/losses.py
imports: import numpy
  from typing import Optional
  from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_device_and_dtypes
  from .None import backend_version
label_desc: Use image node_id 1 for calling a global function with example usage: huber_loss() and returns: np, np, loss