【问题标题】:Tensorflow Serving: Need to make HTTP request to TF Server which accepts only gRPC requestsTensorflow Serving:需要向仅接受 gRPC 请求的 TF Server 发出 HTTP 请求
【发布时间】:2018-05-25 14:33:11
【问题描述】:

我的客户端在我只能向任何服务器发出 HTTP 请求的服务器上。 Tensorflow 托管在 AWS 机器上,它只接受 gRPC 请求。正在寻找一些线索来促成这种交流?

编辑:2018 年 6 月 12 日

TF 正式发布 REST API 服务

https://www.tensorflow.org/serving/api_rest

他们使用这个特殊的例子:half_plus_three

服务器:

$ tensorflow_model_server --rest_api_port=8501 \ --model_name=half_plus_three \ --model_base_path=$(pwd)/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_three/

客户:

$ curl -d '{"instances": [1.0,2.0,5.0]}' -X POST http://localhost:8501/v1/models/half_plus_three:predict { "predictions": [3.5, 4.0, 5.5] }

【问题讨论】:

  • 您是否成功地使用了 REST API?我正在使用 tensorflow 1.8 的 AWS 实例上运行,但 tensorflow-model-server 无法识别“--rest_api_port”

标签: http tensorflow deep-learning grpc tensorflow-serving


【解决方案1】:

您的服务器运行的是哪种语言/平台?

OTOH,TF 现在正在添加 REST 支持。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-12-06
    • 2021-07-19
    • 1970-01-01
    • 2021-10-06
    • 1970-01-01
    • 1970-01-01
    • 2018-03-12
    相关资源
    最近更新 更多