Questions tagged [tfjs-node]

64 questions
0
votes
1 answer

ReactJS - Faceapi.js Error: toNetInput - expected media type issue

I am new to reactjs and building a page/component for uploading an image and running it through faceapi.js to show face landmark points. I am trying to get these points in an array to be used for some other process later on. The webcam version works…
0
votes
1 answer

Using Saved Model Format from Tensorflow Lite Model Maker leads to poor prediction results

Following this tutorial I created an simple model for image classification with Tensorflow Model Maker. I changed export format from tflite to Saved Model as I intended to use it with tfjs-node as shown here. # model.export(export_dir='.')…
jirzi
  • 3
  • 2
0
votes
1 answer

Unable to build @tensorflow/tfjs-node

The problem: Basically I cannot manage to install the last version of tensorflow for node (npm install @tensorflow/tfjs-node). Main concern: which versions of node.js, node-gyp, node-pre-gyp, visual studio code and python may I use? As the followed…
0
votes
0 answers

can't in any way require @tensorflowjs/tfjs-node

it gives me an error everytime i try to import it, if i have a file with any line that imports the library const tf = require("@tensorflowjs/tfjs-node"); or const tf = require("@tensorflowjs/tfjs"); require("@tensorflowjs/tfjs-node"); and try to…
lópbu
  • 1
  • 2
0
votes
1 answer

How to get a spectrogram offline with the right shape as an input to recognize()?

I am trying to perform offline recognition with my own trained model according to this doc: https://github.com/tensorflow/tfjs-models/tree/master/speech-commands I had the same issue as https://github.com/tensorflow/tfjs/issues/3820 described, and I…
0
votes
0 answers

@tensorflow/tfjs-node-gpu works with NVIDIA P4 but fails with V100 on GKE

My tfjs-node-gpu code works great on an NVIDIA p4 on GKE (and using WebGL in a browser), but it fails on a v100 and t4. Node is crashing in the first predict call inside my warmup. I'm using small 128x128 tiles to predict a 4x image upscale using…
0
votes
1 answer

How to train tensorflow.js on medical data

I'm doing a POC script with tfjs and some (fake) medical data (breast cancer). The data looks like this: [206, 293, 140, 126, 117, 27, 35, 152, 239, 79] with results (ys) is [1] where 1 is malignant and 0 is benign. The script appears to train, but…
Silvertail
  • 169
  • 1
  • 13
0
votes
1 answer

Tensorflow JS load TFHub model locally

I'm loading a model from TFHub via the loadGraphModel of @tensorflow/tfjs-converter package. loadModel = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2,…
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
0
votes
2 answers

not able to find tfjs-node bindings

I am trying tfjs-node in my machine for one of my projects and i keep getting the below issue. Error: The Node.js native addon module (tfjs_binding.node) can not be found at path:…
0
votes
1 answer

Unable to install tfjs-node behind corporate proxy

I made a tfjs solution for object detection and want to deploy it on server behind corporate proxy. Problem happens because tensorflow\tfjs-node\scripts\install.js does not supprot proxy so it tries to fetch the…
0
votes
1 answer

Loading a keras model into tfjs causes input shape mismatch

I made a model in Keras and saved it as a tfjs model. I imported it to my js project successfully. I am, however, unable to use the model in my JS code because of an input shape error. Keras model: # Python model =…
0
votes
1 answer

Strategies for pre-training models for use in tfjs

This is a more general version of a question I've already asked: Significant difference between outputs of deep tensorflow keras model in Python and tensorflowjs conversion As far as I can tell, the layers of a tfjs model when run in the browser (so…
slothtopus
  • 11
  • 2
0
votes
2 answers

How to load bodypix model from local disk?

My app can't connect Internet all the time, and how to load trained bodypix from local disk? The nodejs code snippet const net = await bodyPix.load({ architecture: 'MobileNetV1', outputStride: 16, multiplier: 0.75, …
Jack Tang
  • 59
  • 5
0
votes
1 answer

Error: The specified module could not be found. \\?\C:\Program Files\nodejs\tf\node_modules\@tensorflow\tfjs-node\lib\napi-v5\tf js_binding.node

I am getting an error when importing '@tensorflow/tfjs-node' module. My problem is similar to that mentioned in Cannot import @tensorflow/tfjs-node in nodejs TensorFlow.js version- 1.7.3 Platform informations: Windows 8.1 Python 2.7.12 npm…
Shariq Azim
  • 136
  • 16
0
votes
1 answer

How to draw samples from a categorical distribution in TensorFlow.js

Issue in short In Python version of Tensorflow there is a tf.random.categorical() method that draws samples from a categorical distribution. But I can't find a similar method in TensorFlow.js API. So, what is the proper way to draw samples from a…