Tensorflow Serving returns "Tensor name: probability has no shape information"
See original GitHub issueFor given exported model:
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input'] tensor_info:
dtype: DT_STRING
shape: unknown_rank
name: input_image_as_bytes:0
The given SavedModel SignatureDef contains the following output(s):
outputs['output'] tensor_info:
dtype: DT_STRING
shape: unknown_rank
name: prediction:0
outputs['probability'] tensor_info:
dtype: DT_DOUBLE
shape: unknown_rank
name: probability:0
Method name is: tensorflow/serving/predict
Sending a following request to the serving REST API:
curl -X POST \
http://localhost:9001/v1/models/testmodel:predict \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"signature_name": "serving_default",
"instances": [
{ "b64": "/9j/4AAk=" }
]
}'
returns an error:
{
"error": "Tensor name: probability has no shape information "
}
is it something that needs to be adjusted in the export function in aocr?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Tensor name has no shape information ERROR when ...
I managed to fix this. I used tf.reshape on what i wanted to output and passed that into the signature builder.
Read more >VAE with Tensorflow probability library. Problems ...
Hello, I am trying to replicate the approach to create a VAE as described here. However, I don't understand the following piece of...
Read more >RESTful API | TFX - TensorFlow
If the output of the model contains only one named tensor, we omit the name and outputs key maps to a list of...
Read more >tf.data.TFRecordDataset | TensorFlow v2.11.0
A scalar tf.int64 Tensor representing the cardinality of the dataset. If the cardinality is infinite or unknown, cardinality returns the named constants tf....
Read more >A Tour of TensorFlow Probability
TensorFlow Probability Distributions have shape semantics -- we partition shapes into semantically distinct pieces, even though the same chunk of memory ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Since months I’m stuck on the same problem using the curl command provided as exemple. But today I tried to understand why this error
{ "error": "Tensor name: probability has no shape information " }
occur with the documentation here: https://www.tensorflow.org/serving/api_rest and I found an answer using this curl command instead:Yeah! I’ve the correct output:
I dont’ know why we have to specify the input tensors in column format instead of using the row format.
"instances": [ { "b64": "/9j/4AAk==" } ]
–>{ "error": "Tensor name: probability has no shape information " }
"inputs": { "input": { "b64": "/9j/4AAk==" } }
–> WorkingOh, that’s interesting. I’ll try to get to it during the weekend.