AI Grounds

Open AI Grounds on a desktop

These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.

Guided discovery

MNIST MLP Inference Debugger

Draw an input. Trace fixed weights. Question the prediction.

Your dataset · 28×28 brightness values

784 pixels feed a fixed dense neural network. Draw a digit or inspect the blank input. Automatic WebGPU inference runs after edits stop.

Class probabilities

No current output. Waiting for a successful model load and WebGPU run.

Keyboard: arrow keys move the outlined pixel, Home/End select the first/last pixel, Space or Enter paints with the selected tool. The exact editors below reach every pixel. Row and column indices start at zero.

Row-major: index = row×28 + column. Selection does not edit the image. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Edit pixel 0: row 0, column 0. Zero is black, one is white. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Pixel 0: (0.000000 − 0.1307) / 0.3081 = -0.424213

MNIST norm follows the default model’s input contract. An uploaded model may require a different convention; changing this setting changes inputs, never weights.

Loading model…

Model · fixed inference parameters

No model is loaded.

Choose a file or drop it here. A successful upload enters free exploration.

Supported models and interpretation

The importer supports a single sequential float32 ONNX path (opsets 13–21): singleton-batch 784-value input, dense Gemm/MatMul, broadcast bias/Add, frozen inference BatchNorm, one ReLU/Sigmoid/Tanh per dense layer, and ten final linear scores with optional terminal Softmax/LogSoftmax. Compatible flatten, constant reshape, identity, float32 cast and inference-only dropout are validated. Branches, unknown operators, training behavior, unsupported shapes and nonfinite parameters are rejected explicitly.

Ten outputs alone do not establish digit labels or input preprocessing. Uploads must use class order 0–9 and the chosen input convention. Model download/network access and WebGPU hardware are required; no CPU fallback or optimizer runs. Hidden traces and logits come from one GPU run; saliency differentiates that fixed model locally. Frozen BatchNorm folding is equivalent in real arithmetic, with possible float32 differences.

Default model card · ONNX Gemm definition