1,572 questions
1
vote
0
answers
61
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
1
answer
37
views
Custom TFJS layer no trainable variables found during training
I made a custom layer in TensorFlow.js that consists of sublayers but not weights of its own. Here is a simplified example
import * as tf from "@tensorflow/tfjs";
import { LayerArgs } from &...
0
votes
0
answers
49
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 ...
1
vote
1
answer
51
views
Quantizing tfjs model to float16 ValueError: Missing output_path argument
I'm trying to quantize a tfjs model to float16 from the standard float32. This is how I loaded my .keras model and converted it to tfjs. This part works.
keras_input_file_path = '/content/cnn_model....
0
votes
0
answers
42
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 ...
0
votes
0
answers
44
views
Camera.Constants.Type.back not working with cameraWithTensors and Expo Camera 13.9.0 in TensorFlow.js
I read the documentation of tensorflow-js and various tutorials and used the "cameraWithTensors" from the tfjs library like shown below:
const TensorCamera = cameraWithTensors(Camera);
...
2
votes
2
answers
55
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(...
1
vote
0
answers
24
views
Error: Error in gradient for op BatchMatMul. The gradient of input 'b' has shape 'b,s,h', which does not match the shape of the input 's,h' #8548
I implemented a definition layer and model using TensorFlowJS, and encountered a problem during training. The code is as follows. Can anyone help solve this problem? Thank you very much
I implemented ...
0
votes
0
answers
23
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 ...
0
votes
0
answers
69
views
error when passing tensor to tensorflow.js model deployed on node-red TypeError: Cannot read properties of undefined (reading 'backend')
I have deployed a deep learning model on node-red. Originally a keras file that was later converted to a model.json format with its .bin shard files.
Using node-red-contrib-tf-model i deployed this ...
-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 ...
1
vote
1
answer
79
views
LogVar layer of a VAE only returns zeros
I'm building a Variational auto encoder (VAE) with tfjs.
For now I'm only exploring with the fashionMNIST dataset and a simple model as follows:
input layer (28*28*1)
flatten
intermediate_1 (dense 50 ...
0
votes
0
answers
10
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 (!...
0
votes
0
answers
79
views
Force TouchDesigner to use a specific python version
I'm running Windows10.
For my project I have to use Python 3.10 with tensorflow-directml, torchvision and other deep learning tools.
The following is a link to one of the many guides about this topic:
...
1
vote
0
answers
62
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—...