tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

Cannot load tflite over npm

Open avi12 opened this issue 3 years ago • 6 comments

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

avi12 avatar Aug 05 '22 15:08 avi12

@avi12 can you please try with latest tflite version 0.0.1-alpha.8 ? also could not run the code which you shared , please check. Thank you

rthadur avatar Aug 09 '22 22:08 rthadur

Try to clone this revision

avi12 avatar Aug 09 '22 22:08 avi12

I am having same problem. Did you @avi12 find any fix ?

haideratGitHub avatar Sep 06 '22 15:09 haideratGitHub

@haideratGitHub IIRC I had to downgrade some packages for it to work

avi12 avatar Sep 06 '22 15:09 avi12

@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", }

haideratGitHub avatar Sep 06 '22 15:09 haideratGitHub

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

avi12 avatar Sep 06 '22 15:09 avi12

Hi, @avi12

Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.

The TFJs team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TFJs version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.

Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow.js space.

Thank you for your support and cooperation.

gaikwadrahul8 avatar Sep 03 '23 23:09 gaikwadrahul8

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Sep 11 '23 01:09 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar Sep 19 '23 01:09 github-actions[bot]

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

google-ml-butler[bot] avatar Sep 19 '23 01:09 google-ml-butler[bot]