Hello, I’m trying to use SegmentationInterpretation module from fastai on my project. However, I get the following error:
dice_loss() got an unexpected keyword argument ‘reduction’
This dice_loss is a custom loss that I added to my model that is better for my problem
def dice_loss(input, target): # pdb.set_trace() smooth = 1. input = input[:,1,None].sigmoid() iflat = input.contiguous().view(-1).float() tflat = target.view(-1).float() intersection = (iflat * tflat).sum() return (1 - ((2. * intersection + smooth) / ((iflat + tflat).sum() +smooth)))
Is it possible to use SegmentationInterpretation with custom loss functions? If so, why is this error happening?