Last active
July 17, 2018 16:34
-
-
Save alexbw/17d4295afcec739084960d2032edfff2 to your computer and use it in GitHub Desktop.
Huber Loss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def huber_loss(a): | |
if tf.abs(a) <= delta: | |
loss = a * a / 2 | |
else: | |
loss = delta * (tf.abs(a) - delta / 2) | |
return loss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment