nx_f32_conv2d_backward_gate.nx
buildroot/runtime/nx_f32_conv2d_backward_gate.nx
about
nx_f32_conv2d_backward_gate.nx -- EXACT gradient check of nx_f32_conv2d_backward. Integer-valued inputs/weights
make every gradient an exact small integer, so the analytic backward is checked BIT-EXACT (nx_i32_to_f32 canonical
f32, ==) with NO numerical tolerance -- a stronger proof than finite-difference. Toy conv: C_in=1 H=3 W=3
input=[1..9], C_out=1 KH=KW=2 stride=1 pad=0 (OH=OW=2), weight=[10,20,30,40].
dOut=all-ones -> dW=[12,16,24,28], dBias=4, dIn(0,0)=10, dIn(1,1 center)=100 (verified by hand)
dOut=[1,2,3,4] -> dW[0,0]=37, dBias=10 (general dOut weighting)
stride=0 -> ERR_BAD_ARGS (guard)
expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_f32_cvt.nxnx_f32_conv2d_backward.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
| 13 | func gp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return sys_write(1, s, n) } |
| 14 | func gn(v: i64) -> i64 |
| 24 | func main(argc: i64, argv: *i64) -> i64 |