google 云批量预测仅支持 Tensorflow.FRAMEWORK_CUSTOM_CLASS
google cloud Batch prediction only supports Tensorflow.FRAMEWORK_CUSTOM_CLASS
我正在尝试对自定义模型预测例程进行一些图像批量预测。我已按照 this 教程创建例程包装器。我已经将我的模型部署为 tar.gz 在 google 云 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 它直接显示它包含的图像。很酷!
但是我不明白错误。
批量预测目前不支持自定义预测。它仅支持在线预测。错误消息应该是:"Batch prediction only supports Tensorflow."
我正在尝试对自定义模型预测例程进行一些图像批量预测。我已按照 this 教程创建例程包装器。我已经将我的模型部署为 tar.gz 在 google 云 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 它直接显示它包含的图像。很酷!
但是我不明白错误。
批量预测目前不支持自定义预测。它仅支持在线预测。错误消息应该是:"Batch prediction only supports Tensorflow."