Questions tagged [tfjs-node]
64 questions
1
vote
1 answer
Error when checking target: expected dense_Dense5 to have shape [,1], but got array with shape [3,4]
I've been trying to set up a simple reinforcement learning example using tfjs. However, when trying to train the model I am running into the following error:
Uncaught (in promise) Error: Error when checking target: expected dense_Dense5 to have…

Jezfromthe6
- 21
- 3
1
vote
1 answer
Fail to rebuild npm rebuild @tensorflow/tfjs-node build-addon-from-source
I have no idea whats happening here. I've seen solutions with electron but it does not apply to this context.
My node -v is v10.16.3
My package.json is:
"@tensorflow-models/mobilenet": "^2.0.4",
"@tensorflow/tfjs": "^1.7.4",
"@tensorflow/tfjs-node":…

cyruslk
- 839
- 3
- 13
- 25
1
vote
1 answer
How do I load a batch of images to be processed by my tfjs model
I've created a model in Keras and converted it to a Tensorflow.js model and loaded it into my node.js project. And now I want to get predictions from this model in Tensorflow.js. I have figured out how to load a single image:
var singleImageData =…

GeekOverdose
- 325
- 2
- 10
1
vote
0 answers
Unable to install 'node-red-contrib-tf-model' using NPM on windows10x64
I followed the tutorials below for the installation of the tensorflow model:
https://flows.nodered.org/node/node-red-contrib-tf-model
https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md
Steps taken:
I first…

AdlietMeyer
- 11
- 2
1
vote
1 answer
tfjs-node on old cpu (without AVX)
There is a desire to do the initial steps in tfjs using nodejs. At the moment, for tests, I can only use a computer with the following configuration:
Windows 7 SP1
8Gb Ram
e7500 (no AVX)
GeForce 750Ti
node v12.19.0
When using tfjs-node, I get the…

lex mulya
- 31
- 3
1
vote
1 answer
How to get LSTM to handle long input samples, without reducing the size of the network?
Background:
I'm using an LSTM (built in tensorflow.js) to generate text based off an input text file. I split up the text file into samples and I originally made each sample have a length of 10. Then I scaled it up to 20, and everything was fine.…

N8Javascript
- 140
- 10
1
vote
0 answers
How can Node.js (v14) be forced to use more RAM?
I'm trying to train a quite memory-hungry Tensorflow.js model, but I am running into some very strange Node.js behavior.
$ node --max-old-space-size=16384 --initial-old-space-size=16384 --max-heap-size=16384 --initial-heap-size=16384…

Wizek
- 4,854
- 2
- 25
- 52
1
vote
1 answer
Unable to load Node backend for Tensorflow (TypeError: Cannot read property 'nonMaxSuppressionV3Impl' of undefined)
I'm trying to use face-api.js facial recognition functions, which would run a lot faster with an installed Node backend. I've installed the backends with npm as below:
$ node -v
v14.1.0
$ npm list @tensorflow/tfjs-node
appname@0.1.0…

akoi
- 11
- 2
1
vote
1 answer
Are weights shared across all inputs and outputs?
I've just started reading Deep Learning with JavaScript.
Here's the code example from the chapter Predicting the duration of a download.
const trainData = {
sizeMB: [0.080, 9.000, 0.001, 0.100, 8.000, 5.000, 0.100, 6.000, 0.050, 0.500,
…

manidos
- 3,244
- 4
- 29
- 65
1
vote
2 answers
Platform browser has already been set. Overwriting the platform with [object Object]. when using tfjs-node in electron app
Platform browser has already been set. Overwriting the platform with [object Object].
Error when trying to load file that has tfjs-node as an import:
const tf = require('@tensorflow/tfjs-node');
This only occurs in electron files that are loaded by…

BradleyB19
- 147
- 5
- 10
1
vote
3 answers
Running TensorFlow.js (tfjs-node) on AWS Lambda (Node.js)
Is it possible to run TensorFlow.js (the Node.js version - tfjs-node) on AWS Lambda? I tried to deploy tfjs-node as AWS Lambda Layer but it exceeds allowed 256 MB size limit.

Piotr Walczyszyn
- 91
- 5
1
vote
1 answer
Problem at using the data from tf.data.csv in model.evaluate method at Tensorflow.js
How I can use returned values of 'tf.data.csv' in the evaluation method 'evaluate()' in Tensorflow.js?
I wanted to train a simple model on TFJS. First I read the data from a CSV file. Then I trained the model and finally I calculated the loss and…

Mahdi the great
- 13
- 4
0
votes
0 answers
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 cost that much.
I have searched on internet, spent a whole…

Sheikh
- 1
- 1
0
votes
0 answers
Deploying Node.js app with @tensorflow/tfjs-node in Bamboo fails with 'cannot find module' error
We have a Node JS application that is currently built & deployed through a Bamboo pipeline.
We are trying to add the @tensorflow/tfjs-node package for some machine learning initiatives, but our deploy is failing with the following error:
OUT npm…

Travis V
- 1
0
votes
1 answer
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.sequential();
// Add a single input layer
model.add(
…

serlingpa
- 12,024
- 24
- 80
- 130