lib/neural_network/)
Pure-SPL MLP helpers plus a baked 8×8 digit classifier. Load the whole
folder with
use neural_network;
(every .spl in the package, sorted
by filename). Nested files also work:
use neural_network.ops;.
use neural_network; list.createList([1, 2], x); list.createList([1, 0, 0, 1], w); list.createList([0, 0], b); y.setVar(function.nnDense(x, w, b, 2, 2)); probs.setVar(function.nnSoftmax(y)); digit.setVar(function.nnPredictDigit(pixels64));
activations.spl,
ops.spl,
mlp.spl,
nn_digits_weights.spl
(do not edit weights by hand).
index = outIndex * inDim + inIndex.
nnForward2 is ReLU hidden +
softmax out.
nnPredictDigit uses the baked
64→64→10 digit net.
examples/play/digit_recognizer.spl
for the drawing UI.