【发布时间】:2019-10-06 04:34:13
【问题描述】:
我正在尝试对自定义模型预测例程进行一些图像批量预测。我遵循this 教程来创建例程包装器。我已经将我的模型作为 tar.gz 部署在 google cloud ai 平台上,创建了一个版本等等。现在,当我尝试使用此命令从命令行启动批量预测时:
gcloud ai-platform jobs submit prediction $JOB_NAME --model $MODEL_NAME \
--input-paths $INPUT_PATHS \
--output-path $OUTPUT_PATH \
--region $REGION \
--data-format $DATA_FORMAT
我收到以下错误
ERROR: (gcloud.ai-platform.jobs.submit.prediction) INVALID_ARGUMENT: Field: prediction_input.framework Error: Batch prediction only supports Tensorflow.FRAMEWORK_CUSTOM_CLASS
- '@type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: Batch prediction only supports Tensorflow.FRAMEWORK_CUSTOM_CLASS
field: prediction_input.framework
输入是 JSON 格式,我认为它的结构是正确的,因为在存储桶中,在控制台上,在类型下显示 {"instances": [{"image_bytes": {"b64": "image/jpeg"}}]},如果我单击 JSON,它会直接显示图像它包含了。很酷!
但我不明白这个错误。
【问题讨论】:
-
请帮忙?
-
你使用的是什么框架和版本,它在本地工作吗?
-
您好,非常感谢您对此的回答。我正在使用
RUNTIME_VERSION=1.13 PYTHON_VERSION=3.5 FRAMEWORK=TENSORFLOW。如果它在本地工作,我会尝试。
标签: tensorflow google-cloud-platform gcloud google-cloud-ml gcutil