Question 22 of 56 from exam PMLE: Professional Machine Learning Engineer

Question 22 of 56 from exam PMLE: Professional Machine Learning Engineer

Question

You trained a text classification model.

You have the following SignatureDefs:

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

You started a TensorFlow-serving component server and tried to send an HTTP request to get a prediction using: headers = {"content-type": "application/json"} json_response = requests.post('http: //localhost:8501/v1/models/text_model:predict', data=data, headers=headers) What is the correct way to write the predict request?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.