0%
PythonShip it/30 min

Round 4 model challenge

The task

Graded against a hidden key. You need 450 of 500.

digits8-hidden.csv is already next to your script: 500 rows, each an id and 64 pixel columns named p0 to p63, with brightness values 0 to 16. You do not download or upload anything.

The script already trains the Module 2 network on all 1,797 digits. Finish the two TODOs, using what you practised in the export lesson:

  1. For each row of the hidden file, build a list of its 64 pixels, in order from p0 to p63, each turned into a number and divided by 16, and append it to rows. The csv module gives every value as text, such as "13", so convert it with int(...) or float(...) before dividing.
  2. After the header line, write one line per image to submission.csv: its id, a comma, its predicted digit, and a newline.

Press Run, and the platform submits the file your script wrote.

Before you submit, look at the first ten predictions it prints. A column of the same digit means something went wrong upstream.

Sign in to start

Exercises need an account.

It is free. Log in or create one, and every attempt and pass is saved to your progress.