[tfjs-node] Inconsistent behavior for `BatchMatMul` kernel
See original GitHub issuekernel BatchMatMul
does not have same functionality in WebGL and NodeJS backends
This causes newer variation of FaceMesh-with-Attention model to fail when executing in NodeJS environments
Official implementation for a model was added via issue https://github.com/tensorflow/tfjs/issues/6002 and PR https://github.com/tensorflow/tfjs-models/pull/1002
Reference model is https://tfhub.dev/mediapipe/tfjs-model/face_landmarks_detection/attention_mesh/1
Error is:
Message: In[0] and In[1] has different ndims: [1,4,4] vs. [4,4]
at NodeJSKernelBackend.executeSingleOutput (@tensorflow+tfjs-node@3.18.0/node_modules/@tensorflow/tfjs-node/dist/nodejs_kernel_backend.js:214:43)
at Object.kernelFunc (@tensorflow+tfjs-node@3.18.0/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.js:33:24)
at kernelFunc (@tensorflow+tfjs-core@3.18.0/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:4574:32)
Same model executes without issues in browser environments using WebGL
backend
Environment: TFJS 3.18.0 on Ubuntu 21.10 (WSL2) with NodeJS 16.15.0
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the TensorFlow ...
Read more >@tensorflow/tfjs: Versions | Openbase
This fix makes cumsum tests pass in tfjs-node. [tf.cumsum should pass the correct axis to backend.cumsum] (#1054). Documentation. Added model management methods ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thank you @Linchenn, feel free to close the issue as resolved.
Are you satisfied with the resolution of your issue? Yes No