nx_pose_cnn.nx
buildroot/runtime/nx_pose_cnn.nx
about
nx_pose_cnn.nx -- T2 POSE FRONT-HALF: the sovereign software-f32 pose-CNN FORWARD PASS -- the heatmap PRODUCER
that was the one remaining gap sitting UNDER nx_pose_keypoints. It composes the gated f32 vision substrate
(nx_f32_conv2d_forward, itself only nx_f32_mul/nx_f32_add) into the real heatmap-pose-net SHAPE:
a 3x3 stride-1 pad-1 spatial-conv BACKBONE stage (the ResBlock-class feature extractor)
+ a 1x1 conv HEAD that projects the feature channels into J per-joint confidence heatmaps,
each followed by a ReLU that makes every heatmap value NON-NEGATIVE.
KEY INVARIANT (load-bearing, why this closes the loop with NO glue): IEEE-754 non-negative floats are
ORDER-ISOMORPHIC to their i64 bit-patterns -- for x,y >= +0.0, (x > y) as floats iff (bits(x) > bits(y)) as
integers. So a ReLU'd heatmap can be consumed DIRECTLY by the integer, weights-free back-half nx_pose_keypoints
(argmax + quarter-pixel subpixel + occlusion threshold) with NO f32->int conversion. The ReLU is REQUIRED: a
negative activation carries the sign bit, whose pattern sorts ABOVE any positive peak, so the integer argmax
would pick the wrong cell -- ReLU zeroing negatives to +0.0 is exactly what restores the isomorphism.
This closes the pipeline image -> f32 conv backbone -> f32 1x1 head -> heatmaps -> integer keypoint back-half,
end-to-end and sovereignly, on hand-set weights. Only TRAINED WEIGHTS + a deeper backbone remain (the T3 arc);
the architecture + the arithmetic are proven here. NO libm, NO Q-scaling -- only nx_f32_conv2d/mul/add/gt.
license_tier: ORIGINAL
dependencies 3 imports · 5 importers
imports: nx_syscalls.nxnx_f32.nxnx_f32_conv2d.nx
imported by: nx_pose_backprop_gate.nxnx_pose_cnn_gate.nxnx_pose_distill_gate.nxnx_pose_student_distill.nxnx_vitpose_forward.nx
structs
| none |
consts
| none |
functions
| 26 | func pose_cnn_relu(buf: *i64, n: i64) -> i64 |
| 37 | func pose_cnn_backbone3x3(inp: *i64, C_in: i64, H: i64, W: i64, weight: *i64, C_out: i64, bias: *i64, out: *i64) -> i64 |
| 47 | func pose_cnn_head1x1(feat: *i64, C_in: i64, H: i64, W: i64, weight: *i64, J: i64, bias: *i64, out: *i64) -> i64 |