去矩阵库 [英] Go matrix library

查看:127
本文介绍了去矩阵库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Go有没有用于矩阵乘法的库?

我想在一些服务器节点上编写和部署一些可扩展且快如闪电的ML算法,但是我担心Go会带来的速度和能力是将会被Matlab的成熟度所压倒,甚至在速度较慢的语言中会更快一些。



我宁愿不处理C / C ++,尽管它们是性能之王。



快速矩阵乘法和其他操作只是这项任务的必要条件,如果Go还不够成熟以至于无法拥有一个......那么我需要决定是否是开始它的人,或者简单地使用另一个工具。



感谢

解决方案

如果您想拥有原生解决方案,您可能需要使用 skelterjohn / go.matrix 。据我所知,这是pure go中最先进的矩阵实现。



其特点包括 parallel matrix multiplication here 请记住,使用 cgo 接口C / C ++库。所以,如果你有一个库,但不想编写C / C ++,你可以为你需要的方法编写一些包装,然后继续编写。举例来说, BLAS / LAPACK

更新:正如@Malcom所指出的,所提到的cgo包装的开发似乎已经停滞。查看 biogo


Are there any libraries for matrix multiplication in Go?

I want to write and deploy some scalable and lightning fast ML algorithms on some server nodes, but I'm afraid that the speed and power I'll get with Go are going to be outweighed by the maturity of Matlab or even numpy implementations in "slower" languages that will be much faster.

I'd rather not deal with C/C++, though they are the king of performance.

Fast matrix multiplication and other operations is just simply a necessity for this task, and if Go isn't quite mature enough to have one...well I'll need to decide if I'm the one to start it, or simply use another tool.

thanks

解决方案

If you want to have a native solution, you may want to use skelterjohn/go.matrix. To the best of my knowledge this is the most advanced matrix implementation in pure go.

It features, amongst other things, parallel matrix multiplication as discussed here.

Keep in mind that it is possible to interface C/C++ libraries using cgo. So if you have a library in mind but don't want to write C/C++, you might write some wrapper for the methods you need and write the rest in go. This was done, for example, for BLAS/LAPACK.

Update: As @Malcom pointed out, development of the mentioned cgo wrapper seems to have stalled. Have a look at biogo.

这篇关于去矩阵库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆