These transformations applied on the mask (again, assuming the mask contains class indices) sounds quite dangerous, but I would also expect to see dtype mismatches.
In case you are seeing these transformation applied on a mask with and additional transformation into LongTensors via mask = mask.long(), I’m sure the authors of the repository would be happy to hear about your valid concern.