-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
After exporting the model and testing that it works properly, I've converted it to Tensorflowjs following your steps.
I've loaded it to the browser and I can't find the way to let it predict an image,
Here's the code:
const process_input = (image ) => {
const tfimg = tf.browser.fromPixels(video_frame).toInt();
const expandedimg = tfimg.transpose([0, 1, 2]).expandDims();
return expandedimg;
};
const image = document.getElementById('image');
const preImage = process_input (image);
tf.engine().startScope();
model.executeAsync(testImg).then(predictions => {
console.log(predictions);
tf.engine().endScope();
});
Right after that, I got an error saying:
Unhandled Rejection (Error): TensorList shape mismatch: Shapes -1 and 3 must match
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels