The __getitem__ should return an input tensor in the shape [channels, height, width] and a mask tensor in the shape [height, width] containing class indices in the range [0, nb_classes-1].
The DataLoader will then add the batch dimension to these tensors, such that the input tensor will have a shape of [batch_size, channels, height, width] while the mask [batch_size, height, width].