You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If negative value is not allowed for these concerned APIs, maybe some descriptions on the documentation or validation check inside the source code can provide more information.
The text was updated successfully, but these errors were encountered:
Here are some APIs implemented for kl divergence:
However, when the
y_true
ory_pred
is negative, these APIs output incorrect result which is inconsistent with the documentation (https://www.tensorflow.org/api_docs/python/tf/keras/losses/KLDivergence).Here is the code to reproduce:
I notice that the current code will silently clip the negative value close to zero:
keras/keras/losses/losses.py
Lines 1466 to 1467 in 61bbff5
If negative value is not allowed for these concerned APIs, maybe some descriptions on the documentation or validation check inside the source code can provide more information.
The text was updated successfully, but these errors were encountered: