简体   繁体   English

什么是 PyTorch 相当于 Numpy 的 linalg.solve?

[英]What is the PyTorch equivalent to Numpy's linalg.solve?

torch.gesv了一下,有一些帖子,例如this one ,建议使用torch.gesv但我似乎无法在 PyTorch 文档中找到它。

Pytorch provides the function torch.solve , which behaves like numpy.linalg.solve . Pytorch 提供了函数torch.solve ,其行为类似于numpy.linalg.solve It will output the solution of the the linear system and the LU factorization that has been used to compute it.它将输出线性系统的解和用于计算它的 LU 分解。 More information and example codes here .更多信息和示例代码在这里

Pytorch now has a linalg part very similar to NumPy. Pytorch现在有一个linalg部分非常相似,NumPy的。 So you can do torch.linalg.solve and expect the same behavior as NumPy.所以你可以做torch.linalg.solve并期待与 NumPy 相同的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM