Hello
i am getting the error above in  “criterion.forward” line , i tried another criterion functions but they give the same error
criterion = nn.NLLLoss()
optimizer = torch.optim.Adam(model.parameters(),lr=learning_rate,weight_decay=1e-5)
test_op = model(test_img.cuda())
criterion.forward(test_lb.cuda(),test_op)