Error: Tensor is disposed
See original GitHub issueHi @justadudewhohacks ,
I’m getting the following after performing the below steps:
- load models using
faceapi.loadModels('assets/models/')
(this is successful) - invoke
faceapi.allFaces(input, this.minConfidence).then(..
(whereinput
is the id to a image element. This fails with below error).
core.js:1449 ERROR Error: Uncaught (in promise): Error: Tensor is disposed. Error: Tensor is disposed. at t.throwIfDisposed (face-api.min.js:1) at t.asType (face-api.min.js:1) at t.toFloat (face-api.min.js:1) at face-api.min.js:1 at Array.map (<anonymous>) at face-api.min.js:1 at t.tidy (face-api.min.js:1) at rc (face-api.min.js:1) at face-api.min.js:1 at t.tidy (face-api.min.js:1) at t.throwIfDisposed (face-api.min.js:1) at t.asType (face-api.min.js:1) at t.toFloat (face-api.min.js:1) at face-api.min.js:1 at Array.map (<anonymous>) at face-api.min.js:1 at t.tidy (face-api.min.js:1) at rc (face-api.min.js:1) at face-api.min.js:1 at t.tidy (face-api.min.js:1) at c (polyfills.js:3) at c (polyfills.js:3) at polyfills.js:3 at t.invokeTask (polyfills.js:3) at Object.onInvokeTask (core.js:4751) at t.invokeTask (polyfills.js:3) at r.runTask (polyfills.js:3) at o (polyfills.js:3) at e.invokeTask (polyfills.js:3) at i.isUsingGlobalCallback.invoke (polyfills.js:3)
Did I forget to do sth? Sorry, not familiar with how tensors work so maybe its a stupid question.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
So the error occurs when you are additionally including the tfjs script to face-api.js? Does it work with tfjs-core?
Not sure if there are issues, when you are using tfjs additionally, because someone seemed to have issues with this in #9. In case tfjs-core is enough for your application, you can also access the bundled version via
faceapi.tf.