batchMatMul error
See original GitHub issueTo get help from the community, check out our Google group.
TensorFlow.js version
"@tensorflow/tfjs": "^0.12.4",
"@tensorflow/tfjs-core": "^0.12.12",
"@tensorflow/tfjs-node": "^0.1.11",
Describe the problem or feature request
I was using normali tensorflow JS on my chatbot but Today when I try to install again and run I got this erro:
TypeError: backend.batchMatMul is not a function
at environment_1.ENV.engine.runKernel.$a (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-core\dist\ops\matmul.js:60:86)
at C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-core\dist\engine.js:115:26
at Engine.scopedRun (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-core\dist\engine.js:95:23)
at Engine.runKernel (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-core\dist\engine.js:113:14)
at matMul_ (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-core\dist\ops\matmul.js:60:40)
at Object.matMul (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-core\dist\ops\operation.js:23:29)
at Object.dot (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-layers\dist\backend\tfjs_backend.js:215:24)
at C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-layers\dist\layers\core.js:142:28
at C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-core\dist\engine.js:85:22
at Engine.scopedRun (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-core\dist\engine.js:95:23)
at Engine.tidy (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-core\dist\engine.js:84:21)
at Object.Environment.tidy (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-core\dist\environment.js:45:35)
at Dense.call (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-layers\dist\layers\core.js:139:28)
at C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-layers\dist\engine\topology.js:408:36
at Object.nameScope (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-layers\dist\common.js:25:19)
at Dense.Layer.apply (C:\Users\Ranieri\Documents\Projetos\Node Js\TensorFlowJS\node_modules\@tensorflow\tfjs-layers\dist\engine\topology.js:392:25)
My old project is running great, the same code.
My code: https://github.com/ran-j/ChatBotNodeJS/blob/master/routes/index.js#L325
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Tensorflow - matmul of input matrix with batch data
I'm now trying to multiply each sample in my input data (which is now expanded by embedding dimension) by a matrix variable, U...
Read more >Misleading Error when doing Large Batch Matrix Multiplication
Bug When doing Batch Matrix Multiplication in Pytorch 1.1.0, when too much memory is needed, instead of throwing a meaningful error (the way ......
Read more >Understand batch matrix multiplication
ValueError: Dimensions must be equal, but are 2 and 3 for 'MatMul ' (op: 'MatMul') with input shapes: [60,2], [3,70]. It looks like...
Read more >tf.linalg.matmul | TensorFlow v2.11.0
A simple 2-D tensor matrix multiplication: a = tf.constant([1, 2, 3, 4, 5, 6], ... A batch matrix multiplication with batch shape [2]:....
Read more >jax.lax.batch_matmul - JAX documentation - Read the Docs
Batch matrix multiplication. Parameters. lhs ( Array ) –. rhs ( Array ) –.
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
Hey,
Thanks for filing this. I think the issue might be that the package tfjs currently needs tfjs-core version 0.12.15, but the latest version of tfjs-core is 0.12.16. Our team will resolve this discrepancy soon, but in the meantime, could you confirm that you’ve installed tfjs-core version 0.12.16? And if so, could you downgrade to 0.12.15 and see whether that resolves the issue?
Sorry - I know this is a hacky workaround - I will let you know once tfjs and tfjs-core are back in sync 😃
Thanks! That did it.
One thing to note is that I had just been using
npm
rather thanyarn
and that was asking me to use put an explicit dependency ontfjs-core
in mypackage.json
. Even after changed my package to match what you had suggested it was still asking for thetfjs-core
dependency. If I put that back it, it failed as before.Following exactly what you said, I removed that explicit dependency, switched to
yarn
, and now it’s working.Thanks again!