code wiki / (root) / nx_nn_train.nx

nx_nn_train.nx

buildroot/runtime/nx_nn_train.nx

2563 B55 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind librarytopic nn
docsdependenciesstructsconstsfunctions

about

nx_nn_train.nx -- sovereign FIXED-POINT TRAINING (batch gradient descent), the final piece of the neural-audio moonshot machinery. Together with nx_nn (the forward pass) this makes a net LEARNABLE entirely in integer arithmetic: no FPU, no GPU, no third-party autograd -- so a learned PLC / RVQ-codebook predictor can be trained sovereignly on affordable hardware. MSE loss, analytic gradient of a linear layer (dL/dW = (pred - target) . input), Q-scale step. lr_shift sets the learning rate (bigger = smaller, more stable steps). Composes the same matmul as nx_nn. license_tier: ORIGINAL

dependencies 0 imports · 1 importers

nx_nn_train.nx nx_nn_train_gate.nx

imports: none

imported by: nx_nn_train_gate.nx

structs

none

consts

none

functions

12func nnt_step(X: *i64, Y: *i64, T: i64, W: *i64, I: i64, O: i64, Qshift: i64, update_shift: i64, grad: *i64, pred: *i64) -> i64
called by 1: main
39func nnt_loss(X: *i64, Y: *i64, T: i64, W: *i64, I: i64, O: i64, Qshift: i64) -> i64
called by 1: main