Tfjs: coco-ssd demo example does not work

Created on 6 Feb 2019  路  3Comments  路  Source: tensorflow/tfjs

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

Also tried this version:
https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.15.0

Browser version

Chrome: Version 71.0.3578.98 (Official Build) (64-bit)

Describe the problem or feature request

Seems like a bug with coco-ssd example

Code to reproduce the bug / link to feature request

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 ()

examples bug support

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings