I get this error :
sum() got an unexpected keyword argument \'out\'
when I run this code:
import pandas as pd,
The problem is that y_pred and y_true are not NumPy arrays but either Theano or TensorFlow tensors. That's why you got this error.
y_pred
y_true
You can define your custom metrics but you have to remember that its arguments are those tensors – not NumPy arrays.