【发布时间】:2019-08-19 12:23:38
【问题描述】:
我有一些基本的 tensorflow.js 代码from an example on the documentation:
const image = new ImageData(1, 1);
image.data[0] = 100;
image.data[1] = 150;
image.data[2] = 200;
image.data[3] = 255;
const xs = tf.fromPixels(image);
xs.print();
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.0/dist/tf.min.js"></script>
使用此版本(网站告诉您使用的版本):
https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.0/dist/tf.min.js
并得到错误:Uncaught TypeError: tf.fromPixels is not a function 可能导致这种情况的原因是什么?运行 sn-p 时其他人是否收到此错误?
【问题讨论】:
-
在多个浏览器中测试,同样的错误。
-
我对张量流知之甚少,虽然:你有没有看过
tf中的内容?因为 JS 很少撒谎。
标签: javascript tensorflow tensorflow.js