To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.
Also tried this version:
https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.15.0
Chrome: Version 71.0.3578.98 (Official Build) (64-bit)
Seems like a bug with coco-ssd example
Fairly new to tensorflow js. and was trying out this example: https://github.com/tensorflow/tfjs-models/blob/master/coco-ssd/demo/test_inline.html
Getting this error when it goes into model.detect:
tfjs:2 Uncaught (in promise) Error: TensorArray : Could not write to TensorArray index 0,
because the value dtype is int32, but TensorArray dtype is float32.
at e.write (tfjs:2)
at tfjs:2
at Array.forEach (
at e.writeMany (tfjs:2)
at e.scatter (tfjs:2)
at tfjs:2
at tfjs:2
at Object.next (tfjs:2)
at tfjs:2
at new Promise (
Not a bug, just a compatibility problem. While they don't update to the newest tfjs make sure you have the version 0.13.5 .
"dependencies": {
"@tensorflow-models/coco-ssd": "0.1.1",
"@tensorflow/tfjs": "0.13.5"
}
Also a duplicate #1190
Thanks for pointing me to version numbers.
Seems like "@tensorflow/tfjs": "0.13.5" did not return any predictions.
It worked with "@tensorflow/tfjs": "0.13.1"
@dhrumil83 glad it worked for you , closing this issue for now as this is a duplicate.