Shapes in the types
The size of each dimension is part of a tensor's type, so a product of a 2x3 and a 2x2 matrix doesn't compile.
let a = [[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0]] in
let b = [[1.0, 2.0],
[3.0, 4.0]] in
dot(a, b)Output: error: Dimension mismatch: 3 vs 2
Run