u can’t use predicted to get loss, u should use labels, because u need to get loss by comparing ground truth and predicting label, the predict is outputs, and the ground truth is labels
loss = criterion(outputs, labels)