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?
评论:
chewxy:
Sythe2o0: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
Also, I'm curious as to what is your demand that you can't do with Go
HectorJ:I assume they want to link into something like TensorFlow through python.
chewxy:TensorFlow has a Go lib: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go
(haven't tested it yet though)
bobbafeftta:Ah there is Gorgonia which is the equivalent of TF in Go... I've been using it for years in replacement for TF/Theano. No complaints yet.
BOSS_OF_THE_INTERNET:you could use go to call python directly, interacting via STDIO
alternatively you could look into: https://github.com/sbinet/go-python
cristianchaparroa:Google has Grumpy. Not sure how robust it is regarding third party libs, but it might be worth a look.
you can create micro services with go using micro (go-micro) and use sidecar with python and go, for communicate the both. https://micro.mu/ https://github.com/micro/micro https://github.com/micro/micro/tree/master/car
