Thank you for your quick reply, Thomas. But i think i didn’t quite get what you meant, i tryed to split the dict into several concatenated tensors with this code:
pred_labels = [test_class_list[i] for i in list(predict[0]['labels'].numpy())]
loss = self._loss_fn(pred_labels[0], targets)

Sadly this would give me just a str back:
  File "/tmp/pycharm_project_453/nn_environment.py", line 326, in train_epochs
    loss = self._loss_fn(pred_labels[0], targets)
  File "/home/hsuser/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/hsuser/.local/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 1048, in forward
    ignore_index=self.ignore_index, reduction=self.reduction)
  File "/home/hsuser/.local/lib/python3.6/site-packages/torch/nn/functional.py", line 2693, in cross_entropy
    return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
  File "/home/hsuser/.local/lib/python3.6/site-packages/torch/nn/functional.py", line 1672, in log_softmax
    ret = input.log_softmax(dim)
AttributeError: 'str' object has no attribute 'log_softmax'

then i tryed to convert it via scikit LabelEncoder into a numeric type array and then into a tensor, but that would just give me this message:
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

So how can i make a Input tensor of (C=1,N=1) for CrossEntropyLoss and then the target tensor of size (1,) while output should be a tensor of size (1, 1)? Or do i have some kind of logical error in my assumption?