[英]{ "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.