whestbench.
API

MLP

Validated MLP container with fixed width and layer depth.

class · source

MLP(width: 'int', depth: 'int', weights: 'Weights', seed: 'int' = 0, name: 'str' = '') -> None
Validated MLP container with fixed width and layer depth.

Attributes:
    width: Number of neurons per layer.
    depth: Number of weight matrices (layers).
    weights: Ordered list of weight matrices, each shape ``(width, width)``.
    seed: Per-MLP grader-supplied seed. Estimators using randomness should
        seed off this so their submission reproduces under regrade. Derived
        deterministically from ``ContestSpec.seed`` and the MLP index by
        the evaluator; 0 when no spec seed is provided.
    name: Human-readable per-MLP slug like ``"danielle-johnson"``. Stable
        across runs and backends at the WhestBench release's pinned
        ``faker`` version (see ``whestbench.naming``). Empty string when
        the MLP is constructed outside an evaluator bake path (e.g. in
        unit tests). Estimators may read it for log lines; the leakage
        surface is nil because it is a pure function of ``seed``.