张量流服务
Tensorflow serving
有人知道如何为 tensorflow 服务创建 C# 客户端吗?
我的tensorflow服务安装:
我使用 tensorflow serving dockerfile 安装了 tensorflow serving,然后在容器中执行了以下操作:
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 服务服务器:
tensorflow_model_server --port=9000 --model_name=example_model --model_base_path=/serving/my_model_2 &> my_log &
其中 my_model_2 包含我要服务的导出的张量流模型。
鉴于此信息,我有以下问题:
- 我是否需要以不同的方式安装 tensorflow serving 才能制作 C# 客户端?如果我需要以不同的方式安装它;你能告诉我怎么做吗?
- 您能否大致说明我必须做什么才能实现我的目标?我的意思是,我怀疑我必须以不同的方式安装我的 tf 服务才能创建一个明确的 .proto 文件。如果你能给我一个大概的想法和一个例子,我对此有点迷茫。
据我了解,您需要 proto 文件才能在 C# 中为 grpc 服务生成一个 tensorflow 服务客户端。
https://github.com/Wertugo/TensorFlowServingCSharpClient
这是我正在关注的一个例子。它与 C# 客户端的 MNIST 示例相同。
希望这对您有所帮助。
如果您有更好的选择,请在这里更新。
有人知道如何为 tensorflow 服务创建 C# 客户端吗?
我的tensorflow服务安装:
我使用 tensorflow serving dockerfile 安装了 tensorflow serving,然后在容器中执行了以下操作:
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 服务服务器:
tensorflow_model_server --port=9000 --model_name=example_model --model_base_path=/serving/my_model_2 &> my_log &
其中 my_model_2 包含我要服务的导出的张量流模型。
鉴于此信息,我有以下问题:
- 我是否需要以不同的方式安装 tensorflow serving 才能制作 C# 客户端?如果我需要以不同的方式安装它;你能告诉我怎么做吗?
- 您能否大致说明我必须做什么才能实现我的目标?我的意思是,我怀疑我必须以不同的方式安装我的 tf 服务才能创建一个明确的 .proto 文件。如果你能给我一个大概的想法和一个例子,我对此有点迷茫。
据我了解,您需要 proto 文件才能在 C# 中为 grpc 服务生成一个 tensorflow 服务客户端。
https://github.com/Wertugo/TensorFlowServingCSharpClient 这是我正在关注的一个例子。它与 C# 客户端的 MNIST 示例相同。
希望这对您有所帮助。
如果您有更好的选择,请在这里更新。