def Mat.matmul

bend-ml-tensor@0.1.2.0 · main.bend:270

import bend-ml-tensor@0.1.2.0/main.bend as BendMlTensor
import Base

270# (n x k) · (k x m) = (n x m): the inner dimensions must be the same k
271def Mat.matmul(-n: Nat, +k: Nat, +m: Nat, a: Mat<n, k>, b: Mat<k, m>) -> Mat<n, m>:
272  match a b:
273    case Mat{x} Mat{y}:
274      Mat{matmul.rows(x, transpose.go(m, y))}

Uses (4)

Used by (2)