BendMlAutograd.relu_bwd: def of bend-ml-autograd@0.1.1.0 Import: import bend-ml-autograd@0.1.1.0/main.bend as BendMlAutograd Lines 237-241 of bend-ml-autograd@0.1.1.0/main.bend: https://jend.leeeet.dev/read.txt?path=bend-ml-autograd@0.1.1.0/main.bend&start_line=237&end_line=241 import Base import bend-ml-tensor@0.1.0.0/main.bend as T # y = relu(x); the gradient passes where x > 0 def relu_bwd(-r: Nat, -c: Nat, x: T.Mat, dy: T.Mat) -> T.Mat: match x: case T.Mat{rows}: T.Mat.mul(r, c, dy, T.Mat{mask.rows(rows)}) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-ml-autograd@0.1.1.0/main.bend&name=mask.rows https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor@0.1.2.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor@0.1.2.0/main.bend&name=Mat.mul