I have to calculate the Intersection over Union (IoU) for two segmentations. For that, at some point I have to calculate the bitwise OR of two tensors. I am doing this with (a + b) > 0.
Unfortunately this isn’t differentiable. Does someone know how I can calculate the bitwise OR and still be able to backprop?