问题
I have been using tensorflow with python3 support. There is line in my code which throws me an error.
The error here :
return -10. * np.log10(K.mean(K.square(y_pred - y_true)))
AttributeError: 'Tensor' object has no attribute 'log10'
回答1:
you can do like this:
return 10.0 * K.log(1.0 / (K.mean(K.square(y_pred - y_true)))) / K.log(10.0)
来源:https://stackoverflow.com/questions/41826531/tensorflow-attributeerror-tensor-object-has-no-attribute-log10