Questions tagged [tfjs-node]

64 questions
0
votes
0 answers

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 exist: loading failed. Can someone help? This is…
0
votes
1 answer

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 : expected input to have shape [null,300,300,3] but got…
suravshrestha
  • 329
  • 1
  • 5
  • 14
0
votes
0 answers

How to fix "Error: %1 is not a valid Win32 application."?

I have a Node.js web application which works fine in my local machine. I have used @tensorflow/tfjs-node for loading my ML model and predicting the results in my application. package.json file: { ... "keywords": [], "author": "", "license":…
suravshrestha
  • 329
  • 1
  • 5
  • 14
0
votes
1 answer

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. However, in the Typescript setup I have, require…
Jørgen Tvedt
  • 1,214
  • 3
  • 12
  • 23
0
votes
1 answer

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 "tfdf.keras.RandomForestModel(tuner=tuner,…
0
votes
0 answers

Tensorflow/tfjs-node install issue on Linux Development Server

I have a NodeJS project that is using danfojs-node and @tensorflow/tfjs-node on node version 14.20.1. The project is able to run successfully on Mac OS, but when I try to deploy to a development environment in Cloud Foundry, it bombs out with the…
0
votes
1 answer

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 app should use the QnA model to generate an answer…
0
votes
0 answers

save tflite model in tfjs-node

I use the @tensorflow/tfjs-node package to train a TensorFlow model and would like to save it as tflite. I'm able to save it with model.save('file://./myModel'); and get a myModel folder with the model.json and the weights.bin But how do I…
JoergP
  • 1,349
  • 2
  • 13
  • 28
0
votes
1 answer

Nodejs throwing Illegal instruction - Debian GNU/Linux 10.9

I am trying to run the following nodejs application on a virtual machine running Debian GNU/Linux 10.9 with Node version v14.20.0. require('@tensorflow/tfjs-node'); require('@tensorflow/tfjs-core'); require('@tensorflow/tfjs-backend-cpu'); const…
koko
  • 17
  • 8
0
votes
1 answer

Pass canvas from client (browser) to server (nodejs)

I have a canvas in my browser that displays a feed from my webcam. What I want to do, is send the canvas data to my nodejs server, manipulate it, and send it back. I can do it sending the canvas data via socket.io like…
Lee
  • 1,485
  • 2
  • 24
  • 44
0
votes
1 answer

tfjs-node memory leak even after proper tensor disposal

I've struggling to find where a memory leak occurs in this file. This file is exported as an Event Listener. For context, I have 92 shards (meaning 92 of these listeners) running. I import the model from outside of this file so it's only loaded once…
0
votes
1 answer

Requirements for TFJS on GPU: Trying to Compare the performance of TFJS-node and TFJS-node-GPU

I tried to use an NVIDIA GeForce RTX 1080Ti GPU PC Card to work with TFJS and followed the hardware and software requirements as stated in the documentation, but I could not see a drastic difference in performance yet. Seems like it's ignoring the…
noName
  • 41
  • 2
0
votes
1 answer

Node - tfjs (tensorflowjs in node) error: zsh: illegal hardware instruction node app.js

I am working with tensorflowjs in node. when i run the code, "const tf = require('@tensorflow/tfjs-node');" it throw an error "zsh: illegal hardware instruction node app.js". i am using macbook air M1 chip.
0
votes
1 answer

react native app crashes when tf.ready called

I followed all instructions to install @tensorflow/tfjs-react-native given at https://www.npmjs.com/package/@tensorflow/tfjs-react-native/v/0.3.0 this is my app.js file: import React, { useState, useEffect } from 'react'; import * as tf from…
lekhraj
  • 1
  • 1
0
votes
1 answer

Object detection with tensorflow.js not able to detect

I'm trying to do detection in web application with a custom yolov4 darknet model, which has been converted to tensorflow following the steps here: https://github.com/hunglc007/tensorflow-yolov4-tflite Then the model has been converted to…