You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,dear,
after Saved the SavedModel according to the official link, I used the tensorflow-model-server reload the SavedModel, but when I use requests to query, I got the bug bellow,
>>> headers
{'content-type': 'application/json'}
>>> data
'{"signature_name": "serving_default", "instances": [{"age": [46.0], "education_num": [10.0], "capital_gain": [7688.0], "capital_loss": [0.0], "hours_per_week": [38.0]}, {"age": [24.0], "education_num": [13.0], "capital_gain": [0.0], "capital_loss": [0.0], "hours_per_week": [50.0]}]}'
>>> jp=requests.post(url2,data=data,headers=headers)
>>> jp.text
'{\n "error": "Failed to process element: 0 key: age of \'instances\' list. Error: INVALID_ARGUMENT: JSON object: does not have named input: age"\n}'
The text was updated successfully, but these errors were encountered:
saved_model_cli run --dir models/wdSavedModel/1647337804/ --tag_set serve --signature_def="predict" --input_examples='examples=[{"age":[46.], "education_num":[10.], "capital_gain":[7688.], "capital_loss":[0.], "hours_per_week":[38.]}, {"age":[24.], "education_num":[13.], "capital_gain":[0.], "capital_loss":[0.], "hours_per_week":[50.]}]'
Result for output key all_class_ids:
[[0 1]
[0 1]]
Result for output key all_classes:
[[b'0' b'1']
[b'0' b'1']]
Result for output key class_ids:
[[1]
[0]]
Result for output key classes:
[[b'1']
[b'0']]
Result for output key logistic:
[[0.9291346 ]
[0.17225692]]
Result for output key logits:
[[ 2.5734713]
[-1.5697157]]
Result for output key probabilities:
[[0.0708654 0.9291346 ]
[0.82774305 0.17225692]]
hi,dear,
after Saved the SavedModel according to the official link, I used the tensorflow-model-server reload the SavedModel, but when I use requests to query, I got the bug bellow,
The text was updated successfully, but these errors were encountered: