def act_f2

bendtorch@1.3.0.0 · main.bend:737

import bendtorch@1.3.0.0/main.bend as Bendtorch
import Base
import bend-ml-tensor-array@0.1.18.0/main.bend as TA

737# an element-wise activation that saves a copy of its output (relu, sigmoid, tanh: their derivative is a function of
738# the output). `f` is the activation, `d(dy, y)` the gradient of its input.
739def act_f2(-n: Nat, -c: Nat, r: TA.MM2<n, c>) -> Fwd<Unit, TA.Mat<n, c>, TA.Mat<n, c>>:
740  match r:
741    case TA.MM2{y, s}:
742      Fwd{Unit{}, y, s}

Uses (5)

Used by (1)