question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[tfjs-node] Inconsistent behavior for `BatchMatMul` kernel

See original GitHub issue

kernel 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:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vladmandiccommented, Jun 7, 2022

thank you @Linchenn, feel free to close the issue as resolved.

0reactions
google-ml-butler[bot]commented, Jun 7, 2022

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found