tensorsolve(input: Tensor, other: Tensor, dims: tuple[int, ...] | list[int] | None = None)Solve the tensor equation tensordot(A, X, dims=X.ndim) = B for X.
Parameters
inputTensorCoefficient tensor
A. After moving dims (when given) to the
trailing axes, must satisfy A.shape[:B.ndim] == B.shape and
prod(A.shape[B.ndim:]) == prod(B.shape).otherTensorRight-hand side tensor
B.dimstuple of int or list of int= NoneDimensions of
input to be moved to the trailing positions before
solving. If None (default), no dimensions are moved.Returns
TensorSolution X of shape A.shape[B.ndim:] (after moving dims).