Загрузка
solve()check_errorsinfoA (Tensor) – tensor of shape (*, n, n) where * is zero or more batch dimensions.
left (bool, optional) – whether to solve the system or . Default: True.
check_errors (bool, optional) – controls whether to check the content of infos and raise
an error if it is non-zero. Default: False.
out (tuple, optional) – tuple of two tensors to write the output to. Ignored if None. Default: None.
A named tuple (result, info).
Examples:
>>> A = torch.randn(3, 3)
>>> Ainv, info = torch.linalg.solve_ex(A)
>>> torch.dist(torch.linalg.inv(A), Ainv)
tensor(0.)
>>> info
tensor(0, dtype=torch.int32)