dobejamin / labs INK 01 Source & circuit

Read a digit.
Follow its answer.

The ten signed scores are not probabilities.

Draw here
Test 501 of 1797 Reads 8 · label 8
Drawing & keyboard

Your ink is cropped, fitted proportionally into 32×32, then counted in 4×4 blocks, approximating training-image normalization. Keyboard: arrows move, Space paints, Backspace erases.

8

The learned part is the weight.

Training adjusted weights to reduce errors on labeled digits, then scaled and rounded them into integers. They stay fixed here.

FOLLOW HIDDEN NEURON 1
LEARNED WEIGHTS
INK × WEIGHT
+ raises the sum − lowers the sum 0 has no effect
Follow the sum, one product at a time
INPUT —
×
WEIGHT —
→
SUM AFTER ADDING THIS PRODUCT 0

Build more multipliers.
Finish in fewer ticks.

Compute more products at once: five builds preserve every hidden value and score on 2,095 checked inputs. The 180 output ticks stay serial, limiting speedup. Clock counts exclude loading; resources are mapping estimates. Physical board operation and timing remain unverified.

Build the circuit from these sources →
Hidden neurons in parallel

Synthesis measurements loading…

What was measured · sources · limits

Fully connected network with signed 8-bit weights. Hidden sums are floored after dividing by 26, then clamped to 0–255. Score ties choose the smaller digit. The sum inspector shows arithmetic, not an RTL clock trace. The build replay slows CXXRTL write times, identical for every input.

Dataset: Optical Recognition of Handwritten Digits, E. Alpaydin & C. Kaynak (1998), UCI, DOI 10.24432/C50P49, CC BY 4.0. Original 32×32 bitmaps were normalized and pooled into 8×8 block counts. 30 writers supplied training data; 13 different writers supplied the test set.

Production flows: FINN and hls4ml. This circuit uses Yosys synthesis and CXXRTL simulation. Browser inference runs locally; drawings are not sent anywhere.