Yes I have indices for each class. mask_t are essentially labels, when I load them from dataloader, the shape is as follows.
Although I used label inputs with dimension of [1, 512, 512](which is my .png file) and converted it to long using torch.from_numpy(np.array(mask)).long()
ipdb> labels.size()
torch.Size([3, 512, 512])
ipdb> labels
tensor([[[2, 2, 2,  …, 2, 2, 2],
[2, 2, 2,  …, 2, 2, 2],
[2, 2, 2,  …, 2, 2, 2],
…,
[2, 2, 2,  …, 2, 2, 2],
[2, 2, 2,  …, 2, 2, 2],
[2, 2, 2,  …, 2, 2, 2]],
    [[2, 2, 2,  ..., 2, 2, 2],
     [2, 2, 2,  ..., 2, 2, 2],
     [2, 2, 2,  ..., 2, 2, 2],
     ...,
     [9, 9, 9,  ..., 2, 2, 2],
     [9, 9, 9,  ..., 2, 2, 2],
     [9, 9, 9,  ..., 2, 2, 2]],

    [[1, 1, 1,  ..., 2, 2, 2],
     [1, 1, 1,  ..., 2, 2, 2],
     [1, 1, 1,  ..., 2, 2, 2],
     ...,
     [1, 1, 1,  ..., 2, 2, 2],
     [1, 1, 1,  ..., 2, 2, 2],
     [1, 1, 1,  ..., 2, 2, 2]]])