def lin_bwd

bendtorch@1.3.0.0 · spec.bend:94

import bendtorch@1.3.0.0/spec.bend as Spec
import Base
import bendtorch@1.3.0.0/main.bend as T

94# dx = Wᵀ·dy, and dW += dy ⊗ x
95def lin_bwd(+w: List<&2, List<&2, Nat>>, +x: List<&2, Nat>, +dy: List<&2, Nat>, g: List<&2, List<&2, Nat>>) -> T.Bwd<List<&2, List<&2, Nat>>, List<&2, Nat>>:
96  T.Bwd{w, mtv(w, dy), madd(g, outer(dy, x))}

Uses (6)

Used by (1)