TensorFlow: AttributeError: the Tensor object does not have the log10 attribute

I am using shadoworflow with python3 support. There is a line in my code that causes me an error.

The error is here:

return -10. * np.log10(K.mean(K.square(y_pred - y_true)))

AttributeError: The tensor object does not have the log10 attribute

0
source share
1 answer

you can do like this:

return 10.0 * K.log(1.0 / (K.mean(K.square(y_pred - y_true)))) / K.log(10.0)
+1
source

Source: https://habr.com/ru/post/1680652/


All Articles