code wiki / _hdl_build / _ce_grad_gate_authored.nx
_ce_grad_gate_authored.nx
buildroot/runtime/_hdl_build/_ce_grad_gate_authored.nx
about
_ce_grad_gate_authored.nx -- the VERIFIED-GRADIENT gate for tg_celoss (op 6, fused
softmax+cross-entropy), per the law established at T7: every op lands WITH its gradcheck.
GATES: A gradcheck (analytic == central finite difference, all 5 logits, h=1/128, rel<1/32
floor 1/64) | B KAT uniform logits -> CE == ln(n) (the mathematical anchor, oracle =
nx_f32_log itself on a DIFFERENT path: log(5) vs logsumexp of equal shifts) | C conservation
(softmax - onehot sums to 0 => analytic grads sum to ~0). LAWS: flat ifs, no &&/||.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_tgrad_core.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 11 | func ce_fwd(pv: *i64, tv: *i64, n: i64) -> i64 |
| 30 | func main() -> i64 |