machine-learning - TensorflowJS TFJS 错误 : The dtype of dict

标签 machine-learning tensorflow.js glitch-framework

曾尝试运行 https://glitch.com/~tar-understood-exoplanet
并且模型将无法加载,我将无法使用启用网络摄像头。

有人遇到过同样的问题吗?

当程序运行时,在控制台中我得到以下信息:

tfjs:2 Uncaught (in promise) Error: The dtype of dict['image_tensor'] provided in model.execute(dict) must be int32, but was float32
    at Object.b [as assert] (tfjs:2)
    at tfjs:2
    at Array.forEach (<anonymous>)
    at t.checkInputShapeAndType (tfjs:2)
    at t.<anonymous> (tfjs:2)
    at tfjs:2
    at Object.next (tfjs:2)
    at tfjs:2
    at new Promise (<anonymous>)
    at Zv (tfjs:2)

我有一台 Macbook Pro,Windows 上的其他一些人在运行该模型时也遇到了一些问题。我们还在不同的浏览器上进行了尝试,Safari 和 Chrome。

成功!切换到 coco-ssd 2.0.2 后:

我在第 62 行添加了 2.0.2 版本,如下所示:
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/coco-ssd@2.0.2"></script>

最佳答案

同样的错误,自周五晚上 (04/03/2020) 以来才发生
模型在过去几周运行良好。

关于machine-learning - TensorflowJS TFJS 错误 : The dtype of dict,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61036180/

相关文章:

python - 在 scikit learn 中实现自定义损失函数

python - TensorFlow Sigmoid 交叉熵与一维数据的 Logits

javascript - Tensorflow.js tf.Tensor转JS数

javascript - Discord 机器人正在运行两个实例,我找不到其中一个来将其关闭

amazon-web-services - 在标签中找到注释值 21。这大于类(class)数量

javascript - Tensorflow.js tf.browser.fromPixels() 必须是 HTMLVideoElement

javascript - 平台浏览器已设置。用 [object Object] 覆盖平台。在 Electron 应用程序中使用 tfjs-node 时

javascript - 使用 Handlebars 在 .hbs 文件之间链接的最简单方法是什么?

Python NLTK pos_tag 未返回正确的词性标记