The task that you are working on seems a little bit ambiguous for me. So I would be more helpful if you give more information, like, what is your batch size? what is your exact dimensions of target and prediction tensor shapes?
Assuming tensors as you say: preds: [0.45, 0.22, 0.32], target: 1, the corresponding loss calculation should be
import torch

criterion = torch.nn.CrossEntropyLoss()
criterion(torch.tensor([0.45, 0.22, 0.32]).unsqueeze(1).unsqueeze(0), torch.tensor([1]).unsqueeze(0).long())
#tensor(1.2131)

where .unsqueeze(0) for batch size of 1 and .unsqueeze(1) is for sequence length.
print(torch.tensor([0.45, 0.22, 0.32]).unsqueeze(1).unsqueeze(0).shape)
# torch.Size([1, 3, 1])

print(torch.tensor([1]).unsqueeze(0).long().shape)
# torch.Size([1, 1])

I hope this would be helpful.