-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: 'prod' not yet implemented or not found in the registry. Did you forget to import the kernel? #3849
Comments
@HaiDang9719 can you please check a similar issue here ? |
@rthadur I did not use web pack or any backend in my project. I used client-side execution for the project (pure JS and HTML), so it does not have package.json or something similar in your mentioned issue. |
I have a same issue. Any workarounds? |
Hi, in this case prod has not yet been implemented in the WASM backend. You would need to use either CPU or WebGL backends. I'll take this as a feature request to add prod. |
@tafsiri san, Thank you for your comments! |
related PR has been merged and will be available in next release. Thank you |
When will version 2.8.0 be released? |
To get help from the community, we encourage using Stack Overflow and the
tensorflow.js
tag.TensorFlow.js version
2.3.0, TF version: 2.3.0
Browser version
Chrome Version 84.0.4147.135 (Official Build) (64-bit), Firefox 79.0 (64-bit)
Describe the problem or feature request
I have tried with WebGL and CPU, it works fine. However, when I use wasm, it shows the error "'prod' not yet implemented or not found in the registry. Did you forget to import the kernel?"
In the worker.js file, I tried to add the library as follow:
https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js'); importScripts('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js') tf.setBackend('wasm').then(() => {})
I also tried without web worker and defined as follow but it also did not works:
When I tried to visualize the model with Netron, I figured out there is a 'prod' node in the model:
Image
The 'prod' node is defined in Netron as "Computes the product of elements across dimensions of a tensor. Reduces input along the dimensions given in reduction_indices. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_indices. If keep_dims is true, the reduced dimensions are retained with length 1."
And this structure belongs to the function tf.reduce_sum() and tf.reduce_max() that I used in the Tensorflow model. I converted the Tensorflow as Saved_model format (*.pb) and then converted it to TFJS.
Any help is appreciated, thank you.
Code to reproduce the bug / link to feature request
If you would like to get help from the community, we encourage using Stack Overflow and the
tensorflow.js
tag.GitHub issues for this repository are tracked in the tfjs union repository.
Please file your issue there, following the guidance in that issue template.
The text was updated successfully, but these errors were encountered: