Shortcuts

Function torch::linalg::tensorsolve

Function Documentation

inline Tensor torch::linalg::tensorsolve(const Tensor &input, const Tensor &other, OptionalIntArrayRef dims)

Computes a tensor x such that tensordot(input, x, dims=x.dim()) = other.

See https://pytorch.org/docs/main/linalg.html#torch.linalg.tensorsolve

Example:

auto a = torch::eye(2*3*4).reshape({2*3, 4, 2, 3, 4});
auto b = torch::randn(2*3, 4);
auto x = torch::linalg::tensorsolve(a, b);

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources