how to implement custom metric in keras?

后端 未结 3 745
迷失自我
迷失自我 2020-12-05 04:37

I get this error :

sum() got an unexpected keyword argument \'out\'

when I run this code:

import pandas as pd,          


        
3条回答
  •  甜味超标
    2020-12-05 05:15

    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.

    You can define your custom metrics but you have to remember that its arguments are those tensors – not NumPy arrays.

提交回复
热议问题