Bendtorch.act_f2: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 737-742 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=737&end_line=742 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA # an element-wise activation that saves a copy of its output (relu, sigmoid, tanh: their derivative is a function of # the output). `f` is the activation, `d(dy, y)` the gradient of its input. def act_f2(-n: Nat, -c: Nat, r: TA.MM2) -> Fwd, TA.Mat>: match r: case TA.MM2{y, s}: Fwd{Unit{}, y, s} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=MM2 https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Fwd