-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
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
Nan problem for LOG #17
Comments
did you find the solution? i am getting nan loss |
@gulzainali98 adding K.epsilon() fixed Nan |
can this be used on simple classification? i.e i am using CelebA dataset. Image just have to be classified into 40 different classes there is no object detection. |
did you fixed your problem? I add K.epsilon() and still get nan |
@roywang2011 you need to make sure |
I add |
According to mkocabas#17 , add K.epsilon() to fix nan problem for LOG
I guess I would be safe to add epsilon to the log. Something like:
return -K.sum(alpha * K.pow(1. - pt_1, gamma) * K.log(K.epsilon()+pt_1))-K.sum((1-alpha) * K.pow( pt_0, gamma) * K.log(1. - pt_0 + K.epsilon()))
The text was updated successfully, but these errors were encountered: