大型源节点和目标节点的最佳传输 Scipy 线性程序

发布于 2025-01-19 01:59:54 字数 348 浏览 4 评论 0原文

我想分别为大小为 42000 和 18000 的源节点和目标节点求解最佳传输。我知道 Scipy 线性编程模块现在包含 HIGHS,因此使用起来应该非常高效。然而,我已经运行该程序超过15个小时,但还没有找到结果。我将约束矩阵表示为稀疏矩阵(CSR)。我还可以使用其他商业选项,例如 CPLEX,但我很好奇 Scipy 是否能够扩展到这种规模的线性程序。我的代码可以在下面的 Pastebin 链接中找到。我的问题设置是找到 MNIST 中不同类别之间的最佳传输。如果 Scipy 应该扩展到这种大小的线性程序,我可以做些什么来提高运行时间?

Pastebin link: https://pastebin.com/rDTh4V49

I want to solve an optimal transport for source and destination nodes of sizes 42000 and 18000 respectively. I know that Scipy Linear Programming Module now includes HIGHS so it should be pretty efficient to use. However, I have been running the program for over 15 hours and it has not found a result. I am representing my constraints matrix as a sparse matrix (CSR). There are other commercial options I could use like CPLEX but I am curious to see if Scipy is able to scale to a linear program of this size. My code can be found at the Pastebin link located below. My problem setting is finding optimal transport between different classes in MNIST. If Scipy should scale to linear programs of this size, is there anything I can do to improve the runtime?

Pastebin link: https://pastebin.com/rDTh4V49

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文