Hello,
In the docs, we can see that nn.CrossEntropyLoss is the combination of nn.LogSoftmax (responsible for converting the output of your network to a probability distribution) and nn.NLLLoss. Therefore, if you want to use nn.CrossEntropyLoss, you do not need any output layer activation as it is included in the loss function. If you prefer to use nn.NLLLoss, then a nn.LogSoftmax would be a good choice.
You can convert your one-hot encoded target vector to a label in order to use either loss function as above. Here is an example for cross-entropy:
def one_hot_ce_loss(outputs, targets):
    criterion = nn.CrossEntropyLoss()
    _, labels = torch.max(targets, dim=1)
    return criterion(outputs, labels)

targets = torch.tensor([[0, 0, 1], [1, 0, 0], [0, 0, 1], [0, 1, 0]], dtype=torch.int32)
outputs = torch.rand(size=(4, 3), dtype=torch.float32)
loss = one_hot_ce_loss(outputs, targets)
print(loss)

The example supposes a batch size of 4 and the number of possible classes © as 3.
Hope this helps!