Open YoonSungLee opened 3 years ago
The problem is that gamma is 0.75.
and if (1 - pt_1)
in the forward method has negative values the power to a value less than 1 is not defined.
Cause you can't take the square root of a negative number (in real number world)
In paper they say: γ can range from [1,3]
I think it is a bug in the code.
Hi, thank you for your useful repo about a lot of loss functions. I had a problem about class imbalance problem in my project, but solved this problem by using this repo.
But, when using this repo, I was not able to use 'focal_tversky' loss function in this repo. Whenever I use this code, I got an error which means 'validation loss is nan'.
What can I do to use this loss function in my project? Here's my code when I tried to use this function. I changed tensorflow to pytorch.
Thank you.