1,572 questions
1
vote
0
answers
68
views
How do I convert TensorFlow SavedModel into TensorFlow.js format?
I’m trying to convert my TensorFlow SavedModel into a TensorFlow.js format using tensorflowjs_converter.
tensorflowjs_converter --input_format=tf_saved_model --output_format=tfjs_graph_model --...
0
votes
0
answers
59
views
How to enable metal is being used by tensorflow.js with node/Bun
Please comment how to enable Metal with tfjs-node on MacOS
+Metal isn't ready with tensorflow (c++) on the server side.
bun ./verify-backend.js
const tf = require('@tensorflow/tfjs-node');
async ...
0
votes
0
answers
58
views
TensorflowJS: Model load Value Errors
I'm currently trying to load a tensorflow js model in a React app:
const modelPromise = tf.loadLayersModel('/assets/models/tfjs_model/model.json')
However, whenever I use the model I receive the ...
2
votes
2
answers
57
views
how to load a tensorflow model using tensorflowjs
i was building a simple demo that would load a model that i have converted a JSON and binary using tensorfjs. The model is utilizing the following architecture
model = Sequential([
Flatten(...
0
votes
0
answers
27
views
Tensorflow js feed not available in Android phone
I am following this tutorial creating a Tensorflow.js object detection system.
The full code is also available here.
The App.js code:
// Import dependencies
import React, { useRef, useState, useEffect ...
-1
votes
1
answer
49
views
Get Object Detection results from Edge export TFJS model, bin & dict in Express/Node API
I have exported my VertexAI model to TFJS as "edge", which results in:
dict.txt
group1_shard1of2.bin
group1_shard2of2.bin
model.json
Now, I send an image from my client to the Node/Express ...
0
votes
0
answers
13
views
TypeError: prediction.argMax is not a function
Using tensor flow.js for deploy model...
Model get [1,63]
I can't fix problem "const predictedClass = prediction.argMax(1).dataSync();"
async function predictGesture(coordinates) {
if (!...
1
vote
0
answers
66
views
YOLOv8 Hand Detection Fails at Close Range After TensorFlow.js Conversion
I'm using YOLOv8 for real-time hand detection in a web app. The model works well in Python, but after converting it to TensorFlow.js, detection struggles when the hand is too close to the webcam—...
1
vote
0
answers
74
views
Converting tensorflow model using tensorflowjs
Trying to convert a simple CNN using tfjs. The model gets converted, however it does not get loaded in properly. Error: 'An InputLayer should be passed either a batchInputShape or an inputShape.'
tf....
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
1
answer
129
views
How to Change the Default Background of bodySegmentation-mask-body-parts in p5.js?
I'm trying to change the background behind the detected body segment, but I can't get it to work. Even though I'm modifying the background(...) function, it keeps defaulting to white. Can anyone ...
1
vote
1
answer
136
views
Converted Model Using TensorFlow.JS Converter Not Working
I was following the TFJS WebML YT Course from Jason Mayes and following along to the TFJS Converter video, here's my notebook:
Google Colab Notebook
Basically it is an exact replica from the video and ...
1
vote
0
answers
222
views
TensorFlow.js with Expo Camera not processing frames in React Native
I have the following React Native App.js File where I'm trying to print nextImageTensor received, but the flow is not going inside loop(). As a matter of fact loop is not even getting called
App.js
...
2
votes
2
answers
186
views
different predictions on same data, TenserflowJS
I have saved a TFJS model to a document in cloud firestore, if I run this code straight from the browser:
const jsonObject = JSON.parse(TFModeljson);
loadedModel = await
tf.loadLayersModel(tf.io....
0
votes
0
answers
251
views
input_shape error while converting tensorflow model to tensorflow.js model
I want to use my deep learning CNN algorithm in a web application and I converted my tensorflow model, emotion_model.h5 to a tensorflow.js model using this command in the terminal
...
1
vote
0
answers
75
views
cannot back propagate on multi head attention tensorflowjs
I am trying to create a multi-head attention using tensorflowjs. When trying to train the model, an error kept popping up that the gradient shape was inconsistent with the input shape.
reproducable ...
1
vote
0
answers
125
views
Getting a domain/app's categories by quering the chrome://topics-internals/ Classifier directly
Chrome's Topics API's internal tool chrome://topics-internals/ has a Classifier that can list which categories a domain/app belongs to, as determined by an offline file (which is shipped with Chrome) ...
0
votes
0
answers
167
views
Porting TimesNet from PyTorch to Tensorflow.js
I want to use part of the Time Series Library, namely TimesNet on Tensorflow.js. How can I do this?
This requires knowledge of PyTorch, Python and mathematics.
Source code https://github.com/thuml/...
1
vote
0
answers
60
views
How to make Tensorflowjs converter work for .pb files?
I am trying to convert my .pb file (Frozen model format) to TensorFlow.js graph model format. I followed the instructions in the tfjs_converter documentation. So the command that I am running on my ...
3
votes
4
answers
4k
views
An InputLayer should be passed either a `batchInputShape` or an `inputShape`
I saved a CNN model using tfjs. But when I tried to load the model in js I got the following error
tfjs Uncaught (in promise) Error: An InputLayer should be passed either a `batchInputShape` or an `...
0
votes
1
answer
704
views
ERROR Error: Cannot find native module 'ExponentGLObjectManager', js engine: hermes
I'm trying to classify maize leaf diseases using a react native cli offline. l used teachable machine to train a simple machine learning model for 4 classes and have downloaded the tensorflow.js ...
1
vote
0
answers
292
views
Error dumping weights duplicate weight name kernel (tensorflow keras to tensorflowJS export)
I'm having problems to export a simple tensorflow model to a tensorflowjs model, currently I have read the official documentation about recomendations and found the next:
ERROR OUTPUT
failed to ...
0
votes
0
answers
77
views
Error trying to predict in TensorFlow.js and react
I have an error when I try to predict with an LSTM model in React with TensorFlow.js. The purpose of the React project is to translate sign language and I use media pipe holistic to detect key points ...
1
vote
1
answer
675
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
27
views
TF JS crash in engine.ts
I have a JS app which is internally using the TensorFlow.js to run inference on two models. The first model is a GraphModel that consists of 126 nodes. And the second is a LayersModel that consists of ...