我一直在使用tensorflow和python3支持。我的代码中有一行会引发错误。
这里的错误:
return -10. * np.log10(K.mean(K.square(y_pred - y_true)))
属性错误:' Tensor'对象没有属性' log10'
答案 0 :(得分:4)
return 10.0 * K.log(1.0 / (K.mean(K.square(y_pred - y_true)))) / K.log(10.0)