code: def smooth_l1_loss(
      input: tf.Tensor,
      target: tf.Tensor,
      /,
      *,
      beta: Optional[float] = 1.0,
      reduction: Optional[str] = "mean",
  ) -> tf.Tensor:
      diff = tf.abs(input - target)
      loss = tf.where(
          diff < beta, 0.5 * diff**2 / beta, diff - 0.5 * beta
      )
  
      if reduction == "mean":
          return tf.reduce_mean(loss)
      elif reduction == "sum":
          return tf.reduce_sum(loss)
      else:
          return loss
  
file_path: ivy/ivy/functional/backends/tensorflow/experimental/losses.py
imports: import tensorflow
  import math
  from typing import Optional
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_device_and_dtypes
  from .None import backend_version
label_desc: Use image node_id 2 for calling a global function with example usage: smooth_l1_loss() and returns: tf, tf, loss