code wiki / (root) / nx_pose_backprop_gate.nx

nx_pose_backprop_gate.nx

buildroot/runtime/nx_pose_backprop_gate.nx

5675 B99 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic pose
docsdependenciesstructsconstsfunctions

about

nx_pose_backprop_gate.nx -- proves the MULTI-LAYER pose-net backprop COMPOSES correctly (the "scale build-2" de-risk): a 2-layer conv net conv1(1->2) -> ReLU -> conv2(2->1), then the loss gradient is backpropagated through conv2 (nx_f32_conv2d_backward) -> ReLU backward (f32_relu_bwd) -> conv1 (nx_f32_conv2d_backward). Inputs/weights are integers chosen so every pre-activation is POSITIVE (ReLU = identity) -> the net is locally linear -> the chained gradients are exact small integers, verified BIT-EXACT (no tolerance). This shows the training loop already gated for one layer (nx_f32_conv_train_gate) chains correctly through DEPTH -- so a real backbone+head pose net trains; only SCALE + labeled data remain. 1x1 convs at H=W=1 keep the arithmetic hand-checkable. expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_f32_cvt.nx nx_f32_conv2d.nx nx_f32_conv2d_backward.nx nx_pose_cnn.nx nx_f32_train_ops.nx nx_pose_backprop_gate.nx

imports: nx_syscalls.nxnx_f32_cvt.nxnx_f32_conv2d.nxnx_f32_conv2d_backward.nxnx_pose_cnn.nxnx_f32_train_ops.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_i32_to_f32 nx_f32_conv2d_forward nx_f32_add nx_f32_classify nx_f32_exp_field nx_f32_mant_field nx_f32_sign nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_mul nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ pose_cnn_relu nx_f32_gt nx_f32_lt nx_f32_is_nan nx_f32_classify ↻ nx_f32_is_zero nx_f32_classify ↻ gp sys_write gn sys_mmap ↻ sys_write ↻ f32_mse_grad nx_f32_sub nx_f32_add ↻ nx_f32_neg nx_f32_conv2d_backward nx_f32_add ↻ nx_f32_mul ↻ f32_relu_bwd nx_f32_gt ↻ sys_exit

structs

none

consts

none

functions

16func gp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return sys_write(1, s, n) }
called by 1: main calls 1: sys_write
17func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
27func main(argc: i64, argv: *i64) -> i64