torch.matmul_error_inner_dimensions_do_not_match
export type matmul_error_inner_dimensions_do_not_match<
K1 extends number,
K2 extends number,
Shape1 extends Shape,
Shape2 extends Shape,
> = ErrorShape<`matmul_error_inner_dimensions_do_not_match<${K1}, ${K2}>`> & {
readonly _shape1: Shape1;
readonly _shape2: Shape2;
};K1extends numberK2extends numberShape1extends ShapeShape2extends ShapeMatmul inner dimension mismatch error. Occurs when the inner dimensions of a matrix multiplication don't match.
Examples
const a = torch.zeros(2, 3); // [2, 3]
const b = torch.zeros(5, 4); // [5, 4]
const c = a.matmul(b); // ERROR: 3 ≠ 5
// c.shape is matmul_error_inner_dimensions_do_not_match<3, 5, [2,3], [5,4]>