tensorflow - 使用 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 数组作为输入?
任何帮助将非常感激。
解决方案
推荐阅读
- r - R数据表:通过按名称引用其他列来修改列值
- postgresql - 在 postgresql 中使用 st_contains 在几何上连接两个大型 postgresql 表的最快方法是什么?
- javascript - 如何在表单输入字段中获取数据?
- react-native - 如何将对象数组中的值映射到渲染元素的样式
- excel - 查找一个单词并删除接下来的 x 行
- r - 在 R 中,有没有办法在打印后自动运行输出?
- python - 在图中追逐(有点)未知点的算法
- javascript - 如何在 JavaScript 中调整视口大小时使填充逐渐减小?
- sql - Sequelize Postgres - 如何使用 ON CONFLICT 来实现独特的?
- php - 如何使用 laravel 5.8 创建多条路线