【问题标题】:Google Cloud ML Engine fails to create model version of type 'encoded_image_string_tensor'Google Cloud ML Engine 无法创建“encoded_image_string_tensor”类型的模型版本
【发布时间】:2017-09-29 10:21:11
【问题描述】:

我在 ML Engine 上训练了一个对象检测模型并通过调用将其导出:

python object_detection/export_inference_graph.py \ --input_type encoded_image_string_tensor ....

然后我通过调用在本地成功测试了预测:

gcloud ml-engine local predict --model-dir ../saved_model --json-instances=inputs.json --runtime-version=1.2

其中 inputs.json 包含:

{"b64": "base64 编码的 png 图片"}

当我尝试使用以下命令在 ML Engine 上创建模型版本时:

gcloud ml-engine versions create ${YOUR_VERSION} --model ${YOUR_MODEL} --origin=${YOUR_GCS_BUCKET}/saved_model --runtime-version=1.2

它失败并显示以下消息:

ERROR: (gcloud.ml-engine.versions.create) Bad model detected with error: "Error loading the model: Could not load model. "

ML Engine 是否不支持input_type=encoded_image_string_tensor 的模型版本,我如何获得有关错误的更多详细信息?

使用带有input_type=image_tensor 的导出模型在 ml-engine 上创建模型版本可以正常工作。

【问题讨论】:

  • 对给您带来的不便深表歉意。我们正在努力在版本创建时显示错误消息。您能否将您的项目/模型/版本发送至 cloudml-feedback@google.com,我们会为您寻找?

标签: tensorflow object-detection google-cloud-ml-engine


【解决方案1】:

您能否验证您正在使用 tensorflow 1.2 导出模型?

gcloud ml-engine local predict 没有 --runtime-version 标志,因此如果您安装了 TF 1.3 并使用它导出模型,则 local predict 可以使用 TF 1.3,但可能存在不兼容性尝试在服务上使用 TF 1.2 时的模型。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-15
    • 2020-01-30
    • 2018-03-24
    • 1970-01-01
    • 2019-06-21
    • 1970-01-01
    相关资源
    最近更新 更多