Loss functions seem to use one of classes or ignore_index or even both. We should support both options for all loss functions. This generates confusion when using multiple loss functions (see https://github.com/microsoft/torchgeo/issues/1896) This involves updating the following:
Loss functions seem to use one of
classes
orignore_index
or even both. We should support both options for all loss functions. This generates confusion when using multiple loss functions (see https://github.com/microsoft/torchgeo/issues/1896) This involves updating the following:JaccardLoss
FocalLoss
DiceLoss
(this uses bothclasses
andignore_index
TverskyLoss
(this is just a subclass ofDiceLoss
)