code: def huber_loss(x, delta=1.0):
      
      return tf.where(
          tf.abs(x) < delta,
          tf.square(x) * 0.5,
          delta * (tf.abs(x) - 0.5 * delta)
      )
docs: Reference: https://en.wikipedia.org/wiki/Huber_loss