简体   繁体   English

{ “error”:“服务签名名称:在签名定义中找不到”serving_default“”}

[英]{ "error": "Serving signature name: "serving_default" not found in signature def" }

I used GCP(google cloud platform) to train my model and I could export the exported model. I used the model and used a local docker image of Tensorflow serving 1.8 CPU and i get the following result as output for REST post call { "error": "Serving signature name: \"serving_default\" not found in signature def" } I used GCP(google cloud platform) to train my model and I could export the exported model. I used the model and used a local docker image of Tensorflow serving 1.8 CPU and i get the following result as output for REST post call { "error ": "服务签名名称:\"serving_default\" 未在签名定义中找到" }

View the SignatureDefs of your model using SavedModelCLI command as shown below:使用SavedModelCLI命令查看 model 的 SignatureDefs,如下所示:

saved_model_cli show --dir /usr/local/google/home/abc/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_three/00000123

It should show something like shown below:它应该显示如下所示的内容:

signature_def['Classify']:
  The given SavedModel SignatureDef contains the following input(s):
    inputs['inputs'] tensor_info:
        dtype: DT_STRING
        shape: unknown_rank
        name: tf_example:0
  The given SavedModel SignatureDef contains the following output(s):
    outputs['outputs'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, 1)
        name: y2:0
  Method name is: tensorflow/serving/regress

signature_def['serving_default']:
  The given SavedModel SignatureDef contains the following input(s):
    inputs['x'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, 1)
        name: x:0
  The given SavedModel SignatureDef contains the following output(s):
    outputs['y'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, 1)
        name: y:0
  Method name is: tensorflow/serving/predict

Check if you can see the Signature named serving_default in the above Signature Definitions.检查您是否可以在上面的签名定义中看到名为serving_default的签名。

Most probably, as per my understanding, that signature is missing and hence it is resulting in Error.据我了解,很可能缺少该签名,因此导致错误。

How did you export your model?你的model是怎么导出来的? Seemes that you have identified a custom signature but not the default value.似乎您已经确定了自定义签名但不是默认值。 Just change "serving_default" to your signature would be fine.只需将“serving_default”更改为您的签名即可。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:测试预测时出现“serving_default not found in signature def” - Error: "serving_default not found in signature def" when testing prediction 如何将签名名称设置为 serving_default 以避免部署到 GCP AI 平台后出错 - how to set signature name to serving_default to avoid errors after deployment to GCP AI Platform AWS Sagemaker Tensorflow 服务错误:张量名称:<> 没有形状信息 - AWS Sagemaker Tensorflow Serving Error: Tensor name: <> has no shape information 条纹错误:找不到与有效负载的预期签名匹配的签名 - Stripe Error: No signatures found matching the expected signature for payload 如何修复 Stripe 付款错误? 找不到与有效负载的预期签名相匹配的签名 - How to fix Stripe payments error? No signatures found matching the expected signature for payload DocumentDB UnauthorizedException:“在 HTTP 请求中找到的 MAC 签名与计算出的签名不同。” - DocumentDB UnauthorizedException: "The MAC signature found in the HTTP request is not the same as the computed signature." 签名过期:现在早于错误:InvalidSignatureException - Signature expired: is now earlier than error : InvalidSignatureException 使用 go 递归地提供 static 文件 - Serving static files recursively with go Azure Active Directory in .NET Core 2.2 Web-App | 签名无效/未找到签名密钥 - Azure Active Directory in .NET Core 2.2 Web-App | the signature is invalid / signature key was not found 服务模型中的 Kubeflow 管道 - Kubeflow Pipeline in serving model
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM