I think something is messed up with your one-hot encoding.
How about
labels = torch.tensor([0., 0., 1., 1., 0., 2., 0., 2., 0., 0., 0., 0., 0., 1.], dtype=torch.int64)
target = torch.nn.functional.one_hot(labels)

or
labels = torch.tensor([0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0, 1], dtype=torch.int64)
target = torch.nn.functional.one_hot(labels)