Can you try by setting the target_transform attribute as in
train_ds = Cityscapes(DATA_DIR,
                      split='train',
                      mode='fine',
                      target_type='semantic',
                      transform=transforms.ToTensor(),
                      target_transform=transforms.ToTensor()
                      )