首页 > 解决方案 > 使用 Numpy 数组作为输入的 Ai 平台统一批量预测不起作用

问题描述

我的模型是一个 tensorflow.keras 模型,我将它导入到 google ai 平台预测。

我没有使用码头工人。

对于预测,模型需要一个变量 x。

模型.预测(x)

x 是这种形状的 numpy 数组: (1, 244, 244, 3)

当我做ai-platform local predict时,它可以工作。我用于本地预测的文件如下所示(JSONL 格式): {"input_1": [[[151, 138, 131], ...

当我进行批量预测时,作业运行 10 分钟。 https://cloud.google.com/ai-platform-unified/docs/predictions/batch-predictions

之后,创建了一个文件 prediction.results-00000-of-00001但它是空的。在同一位置还有一个名为 prediction.errors_stats-00000-of-00001 的文件 ,它也是空的

所以我不知道问题是什么。

有没有人对如何调试这个有想法?

有没有人像我一样设法在统一的 AI 平台上进行批量预测并使用 numpy 数组作为输入?

任何帮助将非常感激。

标签: tensorflowgoogle-cloud-platformgoogle-ai-platform

解决方案


推荐阅读