我一直在使用支持 python3 的tensorflow。我的代码中有一行引发了错误。
这里的错误:
return -10. * np.log10(K.mean(K.square(y_pred - y_true)))
AttributeError:“张量”对象没有属性“log10”
你可以这样做:
return 10.0 * K.log(1.0 / (K.mean(K.square(y_pred - y_true)))) / K.log(10.0)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)