我想使用keras中定义的各种损失函数来手动计算损失值。例如:如何使用keras找到损失值?
from keras.losses import binary_crossentropy
error=binary_crossentropy([1,2,3,4],[6,7,8,9])
给我的错误,我想使用其他keras损失函数
AttributeError: 'list' object has no attribute 'dtype'.
类似的方式。我有我的y_pred和y_true列表/数组。
使用numpy的数组,而不是完成,其中列出 – Skyy2010
,转换我的名单numpy的数组,但我得到这个'AttributeError的:“numpy.dtype”对象有没有属性“base_dtype''。 –