Not really, as your samples not contain more than a single class and you are now dealing with a multi-label classification use case.
In this setup, you could create multi-hot targets and change the criterion to e.g. nn.BCEWithLogitsLoss:
one_hot_labels = torch.nn.functional.one_hot(labels)
one_hot_labels = one_hot_labels[::2] | one_hot_labels[1::2]
one_hot_labels = one_hot_labels.float()