2

一般如何在 Golang 后台代码中添加 Python 模型

 2 years ago
source link: https://www.v2ex.com/t/816546
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  程序员

一般如何在 Golang 后台代码中添加 Python 模型

  xcTorres · 6 小时 40 分钟前 · 381 次点击
3 条回复    2021-11-19 16:23:28 +08:00

lwch

lwch   6 小时 27 分钟前

楼主想说的是 tensorflow 模型吧,golang 有 tf 的库,不过好像只能用来做预估不能训练

Juszoe

Juszoe   5 小时 53 分钟前

1. tensorflow 使用 tfgo
2. pytorch 也有相应的库,但是比较靠谱的方法是把模型转成 onnx ,再用 onnx-go 推理
3. python 提供 rpc 接口调用

rpman

rpman   5 小时 39 分钟前

CPU 部署一般走 ONNX, 只要模型能顺利转出来就非常香

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK