keras-contrib
keras-contrib copied to clipboard
Inconsistency in Jaccard Loss Implementation
I have come across a few implementations of Jaccard Loss that vary a lot. Among all those, the one by DeepMedic made more intuitive sense to me, as the 'per-class' score is computed first, resulting in a vector of size = # of classes, and then averaged over all classes. I feel that the keras-contrib implementation should be the same as well.
The new implementation will have the 'axis' argument to equate to all dimensions except the last (channel/class) dimension.
We've come across the same problem in our ML task. We came up with the same solution as @stalhabukhari after some research, so we would be glad if the referenced issue could be integrated for future users.