Closed Michael-F-Bryan closed 2 years ago
There is an older version on npm which is 3 months old , we have a bunch of similar issues where users are using older version via npm , requesting @jinjingforever to push newer version to npm. Thank you
In the meantime, @rthadur do you know if it is possible to add the @tensorflow/tfjs-tflite
package directly as a git dependency?
Thank you @Michael-F-Bryan for the report. Your are right. We actually haven't worked on nodejs support for tfjs-tflite yet (hence the alpha version). I will take a look at this soon (already in my todo list).
Thanks!
Can I add a +1 to @Michael-F-Bryan's requirement of using tf-lite in a non-browser environment? We're trying to use it in Node.js.
Note that "non-browser environment" is more than just trying to use @tensorflow/tfjs-tflite
on your backend.
It also means nobody can run tests if the code under test transitively imports @tensorflow/tfjs-tflite
because you'll get a bunch of reference errors when the test runner tries to start.
Hi,
Please try the tfjs-tflite-node package that @mattsoulanille has been working on. Thanks!
@jinjingforever can you reopen this ticket? Having to install a separate dependency doesn't really solve the problem of testing code that may transitively depend on @tensorflow/tfjs-tflite
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
Closing as stale. Please @mention us if this needs more attention.
System information
yarn add @tensorflow/tfjs-tflite@0.0.1-alpha.4
Describe the problem
The
@tensorflow/tfjs-tflite
package can't be used outside of a web browser due to its use of browser-specific APIs.Provide the exact sequence of commands / steps that you executed before running into the problem
Create an empty NPM package and populate it with the following:
Next try to execute
index.js
using Node.You can monkey-patch
Blob
(e.g. by addingwindow.Blob = require("blob-polyfill")
before the@tensorflow/tfjs-tflite
import), but it then fails becauseWindow.self
doesn't exist.