def lf_gnb

bendtorch-gpu@1.3.0.0 · main.bend:491

import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu
import Base
import bend-ml-tensor-gpu@0.1.5.0/main.bend as TG

491# x1 = x, x2 = dy, x3 = g; outputs dx and each block's mean and 1/sqrt(var + eps)
492def lf_gnb(+t: U32, +l: U32, +e: EGN, x1: Array<F32>, x2: Array<F32>, x3: Array<F32>, x4: Array<F32>, o: TG.O2) -> TG.O2:
493  match e o:
494    case EGN{+nb, +ng, +hw, +hwc, +c, +cg, +cg32, +nf, +eps} TG.O2{dx, mr}: gnb_if(U32.is_lt(t, nb), t, ng, hw, hwc, c, cg, cg32, nf, eps, x1, x2, x3, dx, mr)

Uses (7)

Used by (1)