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.

Cannot load tflite over npm

See original GitHub issue

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

  • Have I written custom code: No
  • OS Platform and Distribution: Windows 10 x64 21H2
  • TensorFlow.js installed from: npm
  • TensorFlow.js version (use command below):
    {
      "@tensorflow/tfjs-backend-cpu": "^3.19.0",
      "@tensorflow/tfjs-core": "^3.19.0",
      "@tensorflow/tfjs-tflite": "0.0.1-alpha.8"
    }
    
  • Browser version: Edge beta 104.0.1293.44

Describe the current behavior Unable to load @tensorflow/tfjs-tflite via npm:

<script lang="ts">
  import "@tensorflow/tfjs-backend-cpu";
  import * as tf from "@tensorflow/tfjs-core";
  import * as tflite from "@tensorflow/tfjs-tflite";
  // ...
</script>
 
<!-- other Svelte code -->

screenshot error

Describe the expected behavior Load it as usual

Standalone code to reproduce the issue https://github.com/avi12/lego-ai.js

Additional context For some reason, loading the libraries over CDN in the HTML (not in the .svelte) does work

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
avi12commented, Sep 6, 2022

I personally wouldn’t use @tensorflow/tfjs-tflite as the package is still in akpha

0reactions
haideratGitHubcommented, Sep 6, 2022

@avi12 I am importing @tensorflow-models/blazeface and loading blazeface model. I am getting following error. Is it somehow relatable to this issue or I need to find some where else if you can help ? Screenshot 2022-09-06 at 8 26 40 PM

This is the versions I am using

{ “@tensorflow-models/blazeface”: “^0.0.7”, “@tensorflow/tfjs”: “^3.13.0”, “react”: “^17.0.2”, “react-dom”: “^17.0.2”, “react-router”: “^5.2.1”, “react-router-dom”: “^5.3.0”, “react-scripts”: “4.0.3”, “react-webcam”: “^6.0.0”, }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't load TFLite model on Android/iOS - NODE PAD failed to ...
Occasionally it seems to successfully move past this Pad operation, and will then fail with Node number 2 (SPLIT) failed to prepare. This ......
Read more >
error handling - @tensorflow/tfjs-tflite won't load - Stack Overflow
I tried to load up into a local webpage @tensorflow/tfjs-tflite in the following configuration: import "@tensorflow/tfjs-backend-cpu"; ...
Read more >
node-tflite - npm
Start using node-tflite in your project by running `npm i node-tflite`. There are no other projects in the npm registry using node-tflite.
Read more >
tflite failed to load with error: error getting native address of ...
Can't load TFLite model according to TFLite official examples. Stackoverflow.com > questions > 68593356. Encountered unresolved custom op: Normalize.
Read more >
Custom operators | TensorFlow Lite
Let's walk through an example of supporting a TensorFlow operator that ... loads a model, it calls init() once for each node in...
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