68 questions
2 votes
1 answer
1k views
TypeError: (0 , util_1.isNullOrUndefined) is not a function using @tensorflow/tfjs-node on mac
I am trying to do some image recognition using @tensorflow/tfjs-node and mobilenet. Here is the code: import fs from 'fs'; import * as tf from '@tensorflow/tfjs-node'; // TensorFlow.js for Node.js ...
0 votes
0 answers
76 views
Cpu backend was already registered. Reusing existing backend factory.Platform node has already been set. Overwriting the platform with node
const tf =require('@tensorflow/tfjs-node'); this import showing following error. [0] cpu backend was already registered. Reusing existing backend factory. [0] Platform node has already been set. ...
0 votes
0 answers
22 views
Not getting expected results when loading tensorflowjs model
Followed this guide to create a tensorflow.js neural network https://medium.com/@GeorgePerry/finding-intent-to-buy-from-instagram-comments-with-tensorflow-js-3f764c132be7 It works prefectly until I ...
1 vote
0 answers
50 views
Compilation error using @tensorflow/tfjs-node in Scratch3 development
I am working on building an extension for Scratch3 to do machine learning using tensorflow.js. I forked out a repo from here. When I try to start, it ran into compilation error. Environment details: ...
0 votes
0 answers
158 views
How can I package tensorflow/tfjs-node in an electron app using electron-forge?
I'm trying to package @tensorflow/tfjs-node in an electron project. Everything works properly when I run electron locally, but when I try to package it using electron-forge I get an error An unhandled ...
1 vote
1 answer
679 views
Tensorflow.js Error: Backend name ‘webgpu’ not found in registry when not served on localhost
I am working on getting a local server set up that can serve pages that will have access to tensorflow.js and the webGPU backend. I have run into an issue where if I serve my files on localhost (127.0....
0 votes
1 answer
90 views
tfjs-node training vs tfjs browser predictions giving NaN
I have a trained classification model in tfjs-node that exports a model.json and weights.bin file. When I execute it from the Terminal it works just fine and returns correct prediction probabilities ...
2 votes
1 answer
381 views
How to convert an Image tensor to PNG using react-native?
I am using react-native-tfjs for running a neural network, it gives me an RGB image tensor as one of the outputs. How can I save this as a PNG image? What have I tried so far: Tried to use the tf....
1 vote
0 answers
229 views
How can I convert .ort models to other formats such as .onnx?
How do I convert .ort models to .onnx or any other models. I asked in a discord server few seconds later a guy dmed me and said "I can help you but I will charge 100$" idk why does it even ...
0 votes
1 answer
369 views
tensorflow.js: Unable to load a model saved in tfjs
I am unable to load a sequential model I created using @tensorflow/tfjs-node back into node. My model creation looks like this: import * as tf from '@tensorflow/tfjs-node'; model = tf....
0 votes
0 answers
89 views
Error in loading the model.json in web application
I am trying to load the model.json file (converted from python) and it is having the bin files as well. I have imported tfjs-node and tfjs but still getting the error as \atrbtsjsonmodel.json does not ...
0 votes
1 answer
197 views
Error when checking : expected input to have shape [null,300,300,3] but got array with shape [1,300,300,4]
I'm using tfjs-node for loading model and predicting results in my Node.js application. It was providing decent results but for some image, the following error was shown: Error when checking : ...
0 votes
1 answer
309 views
Typescript & tfjs-node: How to work with the node-gpu version alongside plain node?
I have issues running my tfjs node app with and without the GPU library. In plain javascript, as in the examples - they simply require() either @tensorflow/tfjs-node or @tensorflow/tfjs-node-gpu. ...
1 vote
1 answer
450 views
Tensorflowjs TypeError: Unknown op 'SimpleMLCreateModelResource'
I am having an issue with tensoflowjs where it looks like everything loads properly, but when I go to make a prediction it throws an error. This is a decision forest that was trained in python using &...
0 votes
1 answer
287 views
Error using @tensorflow-models/qna: TypeError: context.trim is not a function
I am working on a React app that uses the TensorFlow QnA model to generate study cards based on user input. I have implemented a form in which the user can enter a question, and upon submission, the ...