Google AutoML tensorflow/tfjs 错误错误:model.execute(dict) 中提供的字典有键:[ToFloat] 不是图形的一部分

问题描述

我在运行用于 Google AutoML 多对象检测的脚本时遇到了标题错误。有什么线索吗?

<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-automl"></script>
<img id="mahjong" src="tiles2.jpg">
<script>
async function run() {
  const model = await tf.automl.loadobjectDetection('model.json');
  const image = document.getElementById('mahjong');
  const options = {score: 0.5,IoU: 0.5,topk: 20};
  const predictions = await model.detect(image,options);
  console.log(predictions);
  // Show the resulting object on the page.
  const pre = document.createElement('pre');
  pre.textContent = JSON.stringify(predictions,null,2);
  document.body.append(pre);
}
run();
</script>

未捕获(承诺)错误:model.execute(dict) 中提供的 dict 有键:[ToFloat] 不是图的一部分 在 e.t.checkInputs (tfjs:17) 吃。 (tfjs:17) 在你 (tfjs:17) 在 Generator._invoke (tfjs:17) 在 Generator.forEach.e. [作为下一个] (tfjs:17) 在 嗯 (tfjs:17) 在 o (tfjs:17) 在 tfjs:17 在新的承诺 () 吃。 (tfjs:17)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...