Tensorflow服务 [英] Tensorflow serving

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

问题描述

有人知道如何为张量流服务创建C#客户端吗?

Does anybody know how to create a C# client for tensorflow serving?

我的张量流服务安装:

我使用tensorflow服务dockerfile安装了tensorflow服务,然后在容器内部执行了以下操作:

I installed tensorflow serving using the tensorflow serving dockerfile, then inside the container I did the following:

pip install tensorflow

pip install tensorflow-serving-api

echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | tee /etc/apt/sources.list.d/tensorflow-serving.list

curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | apt-key add -
apt-get update && apt-get install tensorflow-model-server

然后我运行tensorflow服务服务器:

Then I run the tensorflow serving server:

tensorflow_model_server --port=9000 --model_name=example_model --model_base_path=/serving/my_model_2 &> my_log &

其中my_model_2包含我要服务的导出的Tensorflow模型.

where my_model_2 contains the exported tensorflow model I want to serve.

鉴于此信息,我有以下问题:

Given this information I have the following questions:

  • 我是否需要以其他方式安装Tensorflow服务才能创建C#客户端?如果我需要以其他方式安装它;你能告诉我怎么做吗?
  • 您能否大致了解我为实现自己的目标而必须做的事情?我的意思是,我怀疑我必须以其他方式安装我的tf服务,以便创建一个明确的.proto文件.如果您能给我总体思路和示例,我会对此感到迷茫.

推荐答案

据我了解,您需要原始文件才能在C#中为grpc服务生成一个tensorflow服务客户端.

As far as I understand, you need the proto files to generate a tensorflow serving client in C# for the grpc services.

https://github.com/Wertugo/TensorFlowServingCSharpClient 这是我要关注的一个例子.与使用C#客户端的MNIST示例相同.

https://github.com/Wertugo/TensorFlowServingCSharpClient This is one example I am following. Its the same MNIST example with C# client.

希望这会有所帮助.

如果您有更好的选择,请在此处更新.

Please update here if you have got any better options.

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

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