tflite: tfjs-backend-cpu: Uncaught TypeError: Cannot read property 'whereImpl' of undefined
See original GitHub issueSystem information
- OS Platform and Distribution: Ubuntu 20.04
- TensorFlow.js version: Latest as of writing
- Browser version: Chrome 92
The “Via a script tag” instructions from the tfjs-tflite readme don’t work:
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-cpu"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-tflite"></script>
<script>
(async function() {
const tfliteModel = await tflite.loadTFLiteModel('https://tfhub.dev/tensorflow/lite-model/mobilenet_v2_1.0_224/1/metadata/1');
})();
</script>
But this works fine:
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@3.8.0/dist/tf.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-tflite@0.0.1-alpha.4/dist/tf-tflite.min.js"></script>
<script>
(async function() {
const tfliteModel = await tflite.loadTFLiteModel('https://tfhub.dev/tensorflow/lite-model/mobilenet_v2_1.0_224/1/metadata/1');
})();
</script>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'backend' of undefined #4296
I'm using the latest version of tfjs-node on npm: { "peerDependencies": { "@tensorflow/tfjs-core": "^2.4.0" }, "dependencies": ...
Read more >Unable to load Node backend for Tensorflow (TypeError
Unable to load Node backend for Tensorflow (TypeError: Cannot read property 'nonMaxSuppressionV3Impl' of undefined) · Ask Question. Asked 2 ...
Read more >Cannot read properties of undefined (reading 'backend') - TF.js
Hi everyone, I am experiencing the following error in my code: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ...
Read more >Error in installing node-red-contrib-tf-model - General
Could not resolve dependency: npm ERR! peer ... TypeError: Cannot read property 'whereImpl' of undefined 17 Oct 06:53:50 - [warn] ...
Read more >@tensorflow/tfjs-backend-cpu - npm
Start using @tensorflow/tfjs-backend-cpu in your project by running `npm i @tensorflow/tfjs-backend-cpu`. There are 35 other projects in the ...
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
Good ideas! Thanks @josephrocca. Will update README with versioned links for now.
I just realized that we do have the correct instructions in the README file in the master branch. I will publish a new version to npm soon (maybe in the next 1-2 weeks). Thank you! Closing this issue for now.