You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
demo: the whole MLP as one weight relation (bias folded, layer dim)
Two simplifications collapse the model to a single relation:
- Bias folded into the weights (an nn.Linear): each layer's bias is the weight of
a constant-1 input, kept as the row inp=width of the same weight array, so a
layer is one matrix.
- A layer dimension: every layer's weight lives in one weight(layer, inp, out)
array, so forward/backward filter on the layer COLUMN instead of referencing a
table per layer. The model is one xr.Dataset with a layer dim (NaN-padded for
the ragged pyramid, dropped on seed); from_dataset registers it; the update is
one query over the whole weight relation.
A single contract() and a generic loop train a net of any depth (validated exact
against numpy at depth 3). Tensors.put now unifies batch nullability so UNION
results register cleanly. Faster too (~6s vs ~13s) at the same ~83% test
accuracy; model and metrics still round-trip to xarray.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments