Untitled
unknown
plain_text
3 months ago
361 B
4
Indexable
# Print ground truth and predicted labels for each sample in the batch for i in range(labels.size(0)): # iterate over each sample in the batch gt_label = labels[i].item() # ground truth label pred_label = predicted[i].item() # predicted label print(f"Ground truth label: {gt_label}, Predicted label: {pred_label}")
Editor is loading...
Leave a Comment