I am also getting a similar error. From reading through the forums I saw some suggestion it could be due to the mask tensor containing 0 and 255 values instead of 0 and 1 (which is the case with my example. Using fastai for Segmentation, receiving a CUDA device-side assertion error
Although the suggestion to set div=True doesn’t help me much, as I’m not sure what way to change it. The advice here didn’t work ImageMask.data created by open_mask returns all zeros as SegmentationItemList does not have attribute set_attr()