1,567 questions
1
vote
0
answers
81
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
39
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
73
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
58
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
68
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
53
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);
...
1
vote
2
answers
63
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
36
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
28
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
53
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
113
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 ...
1
vote
0
answers
96
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
votes
1
answer
60
views
AWS IVS client not getting background video blur and only rendering first frame
I am working on an Angular 15 application where I apply a background blur effect to a video stream using CanvasRenderingContext2D and MediaPipeSelfieSegmentation (from bodySegmentation) for real-time ...
1
vote
0
answers
84
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....
1
vote
0
answers
180
views
How to leverage pyannote / speaker-diarization-3.0 with Transformers.js?
pyannote/segmentation-3.0 suggests to use pyannote/speaker-diarization-3.0 since it has better embedding model for diarization. I am trying to use this in client-side JS. It seems like I am supposed ...