I would like to save a Tensorflow model to ml-engine on GCP, and to make an online prediction.
I have successfully created the model on the ml-engine, however, I am struggling to make the input JSON string feed into the model.
Here is the code and data, credit goes to Jose Portilla from his Tensorflow course on Udemy.
I have used gcloud commend for prediction:
gcloud ml-engine predict --model='lstm_test' --version 'v3' --json-instances ./test.json
test.json content:
{"inputs":[1,2,3,4,5,6,7,8,9,10,11,12]}
Errors that I got:
{ "error": "Prediction failed: Error during model execution: AbortionError(code=StatusCode.INVALID_ARGUMENT, details=\"You must feed a value for placeholder tensor 'Placeholder_2' with dtype float and shape [?,12,1]\n\t [[Node: Placeholder_2 = Placeholder_output_shapes=[[?,12,1]], dtype=DT_FLOAT, shape=[?,12,1], _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]]\")" }