We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
categorical_crossentropy
I found that the the calculation result of categorical_crossentropy loss function is different from other deep learning libraries, such as tensorflow.
repo code: theano 1.0.4
import numpy as np from theano import tensor as T y_true = np.array([0., 1., 0.], dtype=np.float32) y_pred = np.array([0.9999999, 0.9999999, 0.0000001], dtype=np.float32) res = T.nnet.categorical_crossentropy(y_pred, y_true) print("loss = ", res.eval()) # loss = 1.192093e-07
tensorflow 2.0.0
import numpy as np import keras y_true = np.array([0., 1., 0.], dtype=np.float32) y_pred = np.array([0.9999999, 0.9999999, 0.0000001], dtype=np.float32) res = keras.losses.categorical_crossentropy(y_true, y_pred) print("loss = ", res.numpy()) # loss = 0.69314724
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I found that the the calculation result of categorical_crossentropy loss function is different from other deep learning libraries, such as tensorflow.
repo code:
theano 1.0.4
tensorflow 2.0.0
The text was updated successfully, but these errors were encountered: