// app.json
"tfjsPlugin": {
"version": "0.1.0",
"provider": "wx6afed118d9e81df9"
}
// package.json
"dependencies": {
"@tensorflow-models/speech-commands": "^0.4.2",
"@tensorflow/tfjs": "^2.0.1",
"fetch-wechat": "0.0.3"
}
// app.js
var tf = require('@tensorflow/tfjs');
// 运行报错
Cannot delete property 'toString' of function () { [native code] }
猜测与 “跳过ES6转ES5处理” 没有关系,因为我自己把代码转到ES5也还是报同样错,难道是用到ES6特性了?
不用分包是因为'@tensorflow-models/speech-commands'这个模型引入时提示需要@tensorflow/tfjs.js
求解答!!!
emmm。。。试试看后台直接引入。。。小程序后台-->设置-->第三方设置-->插件