i have a segmentation task and the label masks have 5 classes.
however, i don't care about the 0th class and i don't need the network to output it, so i limited my network to output only 4 classes.

and i did this:
from pytorch_toolbelt.losses import DiceLoss
loss = DiceLoss(mode="multiclass", ignore_index=0)


however, i get various errors when training, such as "ERROR: Unexpected segmentation fault encountered in worker."

if i define my model to output 5 classes, then the error goes away. what gives?