Activity (Process)

Generating CIFAR-10 Kaggle Submission File

To classify the CIFAR-10 testing set and prepare a Kaggle submission, a trained model iterates over the test dataset and uses an argmax operation to extract numeric class predictions. The competition requires a submission.csv file containing an id column for test sample identifiers and a label column for the predicted string class names. A critical implementation detail when using standard dataset loaders—which read test image filenames in lexicographical order (e.g., '1.png', '10.png', '2.png')—is that the generated numerical test IDs must also be sorted as strings to correctly align with the sequence of the model's predictions. The numeric predictions are then mapped back to their corresponding string labels using the dataset's class dictionary before being exported to the CSV format.

0

1

Updated 2026-05-24

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L