<p>I came from Python where there are a lot of stuffs in Machine Learning. There are some alternatives for ML in golang, but they do not seem to meet my demand. Is there anyway that I can build an API in golang that take advantages from ML codes that are written in Python?</p>
<hr/>**评论:**<br/><br/>chewxy: <pre><p>You can use zmq/grpc + protobuf/flatbufs to call python code. I do that, but increasingly I am replacing most of my ML stuff with Go</p>
<p>Also, I'm curious as to what is your demand that you can't do with Go</p></pre>Sythe2o0: <pre><p>I assume they want to link into something like TensorFlow through python.</p></pre>HectorJ: <pre><p>TensorFlow has a Go lib: <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go" rel="nofollow">https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go</a></p>
<p>(haven't tested it yet though)</p></pre>chewxy: <pre><p>Ah there is <a href="https://github.com/chewxy/gorgonia" rel="nofollow">Gorgonia</a> which is the equivalent of TF in Go... I've been using it for years in replacement for TF/Theano. No complaints yet.</p></pre>bobbafeftta: <pre><p>you could use go to call python directly, interacting via STDIO</p>
<p>see: <a href="http://stackoverflow.com/questions/19397986/calling-python-function-from-go-and-getting-the-function-return-value" rel="nofollow">http://stackoverflow.com/questions/19397986/calling-python-function-from-go-and-getting-the-function-return-value</a></p>
<p>alternatively you could look into: <a href="https://github.com/sbinet/go-python" rel="nofollow">https://github.com/sbinet/go-python</a></p></pre>BOSS_OF_THE_INTERNET: <pre><p>Google has Grumpy. Not sure how robust it is regarding third party libs, but it might be worth a look.</p>
<p><a href="https://github.com/google/grumpy" rel="nofollow">https://github.com/google/grumpy</a></p></pre>cristianchaparroa: <pre><p>you can create micro services with go using micro (go-micro) and use sidecar with python and go, for communicate the both. <a href="https://micro.mu/" rel="nofollow">https://micro.mu/</a> <a href="https://github.com/micro/micro" rel="nofollow">https://github.com/micro/micro</a> <a href="https://github.com/micro/micro/tree/master/car" rel="nofollow">https://github.com/micro/micro/tree/master/car</a></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传