BendtorchGpu.lf_gdw: def of bendtorch-gpu@1.3.0.0 Import: import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu Lines 538-542 of bendtorch-gpu@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-gpu@1.3.0.0/main.bend&start_line=538&end_line=542 import Base import bend-ml-tensor-gpu@0.1.5.0/main.bend as TG # x1 = x, x2 = dy, x3 = the blocks' means and 1/sqrt(var + eps); the gain's and the bias's gradients, in place: a leaf a # channel def lf_gdw(+t: U32, +l: U32, +e: EGW, x1: Array, x2: Array, x3: Array, x4: Array, o: TG.O2) -> TG.O2: match e o: case EGW{+c, +n, +hw, +hwc, +ng, +cg} TG.O2{ga, gb}: gdw_if(U32.is_lt(t, c), t, n, hw, hwc, c, ng, cg, x1, x2, x3, ga, gb) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-gpu@0.1.5.1/main.bend&name=O2 https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=EGW https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=gdw_if