问题 For a binary classification problem with batch_size = 1 , I have logit and label values using which I need to calculate loss. logit: tensor([0.1198, 0.1911], device='cuda:0', grad_fn=<AddBackward0>) label: tensor(1], device='cuda:0') # calculate loss loss_criterion = nn.CrossEntropyLoss() loss_criterion.cuda() loss = loss_criterion( b_logits, b_labels ) However, this always results in the following error, IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1) What