TensorFlowJS is an JavaScript implementation from Google to execute TensorFlow machine learning models (i.e. neuronal networks) in browsers.
Questions tagged [tensorflowjs]
19 questions
6
votes
1 answer
Does TensorFlow.js use the GPU for computations?
The official documentation of TensorFlow.js mentions that it uses WebGL for accessing the GPU. Is WebGL only used for rendering or for computations also?

Sai Raghuram Kaligotla
- 159
- 1
- 11
3
votes
1 answer
Tensorflow vs Tensorflow JS different results for floating point arithmetic computations
I have converted a Tensorflow model to Tensorflow JS and tried using in the browser. There are some preprocessing steps which are to be executed on the inout before feeding it to the model for inference. I have implemented these steps same as the…

Sai Raghuram Kaligotla
- 159
- 1
- 11
3
votes
1 answer
Keras model doest not provide same results after converting into tensorflow-js model
Keras model performs as expected in python but after converting the model the results are different on the same data.
I tried updating the keras and tensorflow-js version but still the same issue.
Python code for testing:
import keras
import…
user11654063
2
votes
1 answer
Can I use reinforcement learning in tensorflowjs?
I'm doing a project at the moment which would require tensorflowjs to create a neural network that learns from reinforcement learning algorithms. Is this possible to do?

Louis Aldous
- 43
- 1
- 5
2
votes
1 answer
How to import trained model without initializing weights
I converted a EfficientNet model that was pretrained on ImageNet to tensorflow-js using the tensorflowjs-converter. When I try to load the model into my script, it tries to initialize the weights with initializers, that are not implemented in tfjs.…

Paul
- 500
- 3
- 8
2
votes
0 answers
How to detect a specific picture inside a video frame (or picture) using tensorflow.js
I've searched all over the place but could not find anything. I'm wondering if it is possible to find a specific image inside another image or video frame using tensorflow.js
Using OpenCV I can do it using feature detection but I'm wondering if…

Thor_Bux
- 1,137
- 12
- 26
2
votes
0 answers
Tensorflow Square function is not precise
I've noticed that the square function in Tensorflow.js does not give the exact number.
I have a scalar with the value 10450. The square of 10450 is 109,202,500. However, tensorflow calculated the square of 10450 as 109,202,496. 4 points of the true…

Cyril
- 2,783
- 1
- 24
- 35
1
vote
1 answer
Unable to import @tensorflow-models in node.js
I have just started working on node.js and I am unable to import tensorlfow js models into my application. The code I am using is:
import * as cocoSsd from '@tensorflow-models/coco-ssd'
const model = cocoSsd.load();
After running the above code I…

Syed Nauyan Rashid
- 221
- 3
- 12
1
vote
2 answers
How to clone a model in tensorflowjs
After training one model on a set of data, I'd like to get a copy of it and train each copy on different data sets. Is there a way to clone a model in such a way that after the cloning each of them can be trained separately?
I've already tried to…

fatmau
- 87
- 1
- 8
1
vote
1 answer
Unable to import tensorflowjs successfully
I have tensorflow 1.5 and everything is working fine with tensorflow.
Now i want to convert my tensorflow keras model to be used in web app so i installed tensorflowjs successfully but when i import i get the error.
I have tried changing the…

DevPy
- 234
- 4
- 16
1
vote
1 answer
TensorflowJS: Optimal way to calculate distance or similarity between multiple tensors?
I'm writing an algorithm that requires I compare two different arrays of tensors, dataset and centroids. dataset has +1000 more tensors than centroids does, and all tensors have the same dimension ([1 x n]).
My current solution (code below) is as…

Jared Wilber
- 6,038
- 1
- 32
- 35
1
vote
1 answer
Error in dot: inputs must all be rank 1 or 2, but got ranks 2 and 0
Error in dot: inputs must all be rank 1 or 2, but got ranks 2 and 0.
is thrown when i try to do dot product
I have tried to reshape it but no luck there
var xs= tf.randomUniform([20,1],0,150,'float32');
//console.log(xs.print());
var noise =…

Mohammad Ummair
- 309
- 2
- 9
1
vote
0 answers
How to write a tensorflowjs-dependent library that will import from either tfjs or tfjs-node appropriately
I am writing a TypeScript library that is basically a clone of the python tensorflow-probability package. I am intending to use this library in other projects, both server-side and in the browser. When the downstream project imports the…

Max Wall
- 19
- 5
0
votes
1 answer
How make a custom object detection model (cocossd), using just tensorflow and nodejs?
I need a turorial about how to create a object detection, using tensorflowjs and nodejs, no browser, no python... is this posible, i tried to start doing this but i get a lot o bugs... so i need a guide line to acomplish this.
I start doing this…

joel
- 1
0
votes
0 answers
tfjs-node-gpu not using GPU
I am trying to use run ML code on GPU developed using the node package tfjs-node-gpu . When I try doing so the program is running but I am unable to see any process being added to the GPU. I suspect that my program is not using GPU for this reason.…

Sai Raghuram Kaligotla
- 159
- 1
- 11