← SPL reference

neural_network (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;.

Forward pass

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));