{"action":"opened","issue":{"url":"https://api.github.com/repos/tensorflow/tfjs/issues/569","repository_url":"https://api.github.com/repos/tensorflow/tfjs","labels_url":"https://api.github.com/repos/tensorflow/tfjs/issues/569/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tfjs/issues/569/comments","events_url":"https://api.github.com/repos/tensorflow/tfjs/issues/569/events","html_url":"https://github.com/tensorflow/tfjs/issues/569","id":346516382,"node_id":"MDU6SXNzdWUzNDY1MTYzODI=","number":569,"title":"Error: TensorArray dtype is float32 but tensor has dtype undefined","user":{"login":"116050423","id":25050871,"node_id":"MDQ6VXNlcjI1MDUwODcx","avatar_url":"https://avatars1.githubusercontent.com/u/25050871?v=4","gravatar_id":"","url":"https://api.github.com/users/116050423","html_url":"https://github.com/116050423","followers_url":"https://api.github.com/users/116050423/followers","following_url":"https://api.github.com/users/116050423/following{/other_user}","gists_url":"https://api.github.com/users/116050423/gists{/gist_id}","starred_url":"https://api.github.com/users/116050423/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/116050423/subscriptions","organizations_url":"https://api.github.com/users/116050423/orgs","repos_url":"https://api.github.com/users/116050423/repos","events_url":"https://api.github.com/users/116050423/events{/privacy}","received_events_url":"https://api.github.com/users/116050423/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-01T09:18:59Z","updated_at":"2018-08-01T09:18:59Z","closed_at":null,"author_association":"NONE","body":"To get help from the community, check out our [Google group](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfjs).\r\n\r\n#### TensorFlow.js version\r\n```\r\ntensorflowjs 0.5.6\r\n\r\nDependency versions:\r\n  keras 2.1.6\r\n  tensorflow 1.9.0\r\n```\r\n#### Browser version\r\n```\r\nN/A\r\n```\r\n#### Describe the problem or feature request\r\n```\r\nWith the latest version of tfjs,  I can  succssfully converte \r\nssd_mobilenet_v1_coco_2018_01_28 to web model and load it. \r\n(This is the Object Detection model)\r\nBut when I try to run model.executeAsync(), \r\nthe error as below happened.\r\n\r\ntf-converter.esm.js?:formatted:6254 Uncaught (in promise) Error: TensorArray dtype is float32 but tensor has dtype undefined\r\n    at e.scatter (tf-converter.esm.js?:formatted:6254)\r\n    at eval (tf-converter.esm.js?:formatted:6388)\r\n    at eval (tf-converter.esm.js?:formatted:144)\r\n    at Object.eval [as next] (tf-converter.esm.js?:formatted:157)\r\n    at eval (tf-converter.esm.js?:formatted:64)\r\n    at new Promise (<anonymous>)\r\n    at __awaiter (tf-converter.esm.js?:formatted:43)\r\n    at executeOp$2 (tf-converter.esm.js?:formatted:6295)\r\n    at executeOp$15 (tf-converter.esm.js?:formatted:6772)\r\n    at eval (tf-converter.esm.js?:formatted:7070)\r\n```\r\n#### Code to reproduce the bug / link to feature request\r\n```\r\nThe reproduce procedure is simple.\r\n1. converte ssd_mobilenet_v1_coco_2018_01_28\r\n2. load and run executeAsync()\r\n \r\nMy code is as below, it's written by React JSX:\r\n\r\n componentDidMount = async () => {\r\n    this.model = new Model()\r\n    await this.model.load()\r\n    const tensor = tf.fromPixels(this.image).toFloat().expandDims(0)\r\n    this.model.model.executeAsync({\r\n      image_tensor: tensor,\r\n    }).then((result) => {\r\n     // TODO\r\n    })\r\n  }\r\n\r\n```\r\n@dsmilkov \r\n```\r\nI tried to read the sourcecode and find the error may happened in \r\ntfjs-converter/src/executor/tensor_array.ts\r\n  scatter(indices: number[], tensor: Tensor) {\r\n    if (tensor.dtype !== this.dtype) {\r\n      throw new Error(`TensorArray dtype is ${\r\n          this.dtype} but tensor has dtype ${tensor.dtype}`);\r\n    }\r\n    // something else......\r\n  }\r\n\r\nI set the breakpoint here and find the input parameter 'tensor' is not ts.Tensor but the Array.\r\nSo tensor.dtype is undefined.\r\nIs this caused by my misuse or bugs? \r\nPlease help, thanks.\r\n```\r\n"}}
{"actor":{"display_login":"116050423"}}