Daw588
February 17, 2021, 11:53pm
1
I am using TensorFlow
and it gives me error every time I try to call model.classify()
.
Error: 'gather' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen
require('@tensorflow/tfjs-node');
require('@tensorflow/tfjs');
const toxicity = require('@tensorflow-models/toxicity');
const threshold = 0.9;
toxicity.load(threshold).then(model => {
const sentences = ['you suck'];
model.classify(sentences).then(predictions => {
console.log(predictions);
});
});
How do I fix this?
This is on your personal machine right? I was reading this GitHub issue and this can be fixed by upgrading other dependencies. Can you show us your package.json?
Daw588
February 18, 2021, 3:39pm
3
Yes this is on my personal machine since Glitch wouldn’t be able to keep up with it and so I can use all the tools I want and need such as Visual Studio Code.
{
"name": "test",
"version": "1.0.0",
"description": "test",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "Daw588",
"license": "ISC",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.0",
"@tensorflow-models/toxicity": "^1.2.2",
"@tensorflow/tfjs": "^2.8.6",
"@tensorflow/tfjs-node": "^2.8.6",
"actions-on-google": "^2.13.0",
"dialogflow": "^1.2.0",
"discord.js": "^12.5.1",
"express": "^4.17.1",
"socket.io": "^3.1.1",
"write-file-atomic": "^3.0.3"
}
}
system
Closed
August 17, 2021, 3:40pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.