a guest Jun 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def custom_loss(eps,w1,w2):
- def loss(y_true, y_pred):
- ans = -1*(w1*y_true*tf.log(y_pred+eps) + w2*(1-y_true)*tf.log(y_pred+eps))
- return ans
- return loss
RAW Paste Data