Error: 'prod' not yet implemented or not found in the registry. Did you forget to import the kernel?
See original GitHub issueTo 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:
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js"></script>
<script>
tf.setBackend('wasm').then(() => );
</script>
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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
related PR has been merged and will be available in next release. Thank you
When will version 2.8.0 be released? I am tired of waiting for prod support;-)