baselines/common/tf_util.py
def huber_loss(x, delta=1.0):
    """Reference: https://en.wikipedia.org/wiki/Huber_loss"""
    return tf.where(
        tf.abs(x) < delta,
        tf.square(x) * 0.5,
        delta * (tf.abs(x) - 0.5 * delta)
    )
def huber_loss(x, delta=1.0):
    """Reference: https://en.wikipedia.org/wiki/Huber_loss"""
    return tf.where(
        tf.abs(x) < delta,
        tf.square(x) * 0.5,
        delta * (tf.abs(x) - 0.5 * delta)
    )
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 ) )
Reference: https://en.wikipedia.org/wiki/Huber_loss
Reference : https : // en . wikipedia . org / wiki / Huber_loss