Is it feasible to allow it to accept a char instead of a long and still index into the logits as mentioned? I’m working on a segmentation problem with around 10 classes, so my label fits comfortably into a single byte. But requiring a long means the mask has to be of type int64, using 7 extra bytes per pixel. This seems non-trivial since then each pixel requires 20 bytes (total across the image and mask) when uint8 mask pixels would mean a total of only 13 bytes, meaning for this problem int64 labels makes a batch require over 50% more memory than with uint8 labels.