torch.linalg.multi_dot
- torch.linalg.multi_dot(tensors, *, out=None)
Efficiently multiplies two or more matrices by reordering the multiplications so that the fewest arithmetic operations are performed.
Supports inputs of float, double, cfloat and cdouble dtypes. This function does not support batched inputs.
Every tensor in
tensorsmust be 2D, except for the first and last which may be 1D. If the first tensor is a 1D vector of shape (n,) it is treated as a row vector of shape (1, n), similarly if the last tensor is a 1D vector of shape it is treated as a column vector of shape .