I trained a model locally with TensorFlow and uploaded it to the Google Cloud ML Engine. Despite local tests with gcloud ml-engine local predict
work fine, using online prediction with gcloud ml-engine predict
fails with this error:
{ "error": "Prediction failed: Error during model execution: AbortionError(code=StatusCode.INVALID_ARGUMENT, details=\"NodeDef mentions attr 'output_type' not in Op output:int64; attr=T:type,allowed=[DT_FLOAT, DT_DOUBLE, DT_INT64, DT_INT32, DT_UINT8, DT_UINT16, DT_INT16, DT_INT8, DT_COMPLEX64, DT_COMPLEX128, DT_QINT8, DT_QUINT8, DT_QINT32, DT_HALF]; attr=Tidx:type,default=DT_INT32,allowed=[DT_INT32, DT_INT64]>; NodeDef: dnn/head/predictions/class_ids = ArgMax[T=DT_FLOAT, Tidx=DT_INT32, _output_shapes=[[-1]], output_type=DT_INT64, _device=\"/job:localhost/replica:0/task:0/cpu:0\"](dnn/head/logits, dnn/head/predictions/class_ids/dimension)\n\t [[Node: dnn/head/predictions/class_ids = ArgMax[T=DT_FLOAT, Tidx=DT_INT32, _output_shapes=[[-1]], output_type=DT_INT64, _device=\"/job:localhost/replica:0/task:0/cpu:0\"](dnn/head/logits, dnn/head/predictions/class_ids/dimension)]]\")" }