tfjs
tfjs copied to clipboard
Cannot load tflite over npm
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 -->

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 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
Try to clone this revision
I am having same problem. Did you @avi12 find any fix ?
@haideratGitHub IIRC I had to downgrade some packages for it to work
@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 ?

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", }
I personally wouldn't use @tensorflow/tfjs-tflite as the package is still in akpha
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.
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.
This issue was closed due to lack of activity after being marked stale for past 7 days.