def linear

bend-ml-autograd@0.1.1.0 · main.bend:211

import bend-ml-autograd@0.1.1.0/main.bend as BendMlAutograd
import Base
import bend-ml-tensor@0.1.0.0/main.bend as T

211# y = x·W + b           x: n x i,  W: i x o,  b: o   ->   y: n x o
212def linear(-n: Nat, +i: Nat, +o: Nat, x: T.Mat<n, i>, w: T.Mat<i, o>, b: T.Vec<o>) -> T.Mat<n, o>:
213  T.Mat.add_row(n, o, T.Mat.matmul(n, i, o, x, w), b)

Uses (5)

Used by (0)

No other definition uses this definition.