Uncaught (в обещании) Ошибка: форма dict ['input'], предоставленная в model.execute (dict), должна быть [1,224,224,3], но была [1,224,224,3] - PullRequest
0 голосов
/ 31 августа 2018

Когда я пытаюсь запустить мобильную сеть (используя производственный скрипт) с использованием tenorflowjs внутри электронного приложения, я получаю следующую ошибку. Тем не менее, тот же код работает в Chrome и Firefox без каких-либо проблем

вот как выглядит мой package.json:

{
  "name": "tfjs",
  "version": "0.1.0",
  "description": "mobilenet",
  "main": "index.js",
  "scripts": {
    "start": "electron .",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "@tensorflow/tfjs": "^0.11.2",
    "connect": "^3.6.6",
    "electron": "^2.0.2",
    "express": "^4.16.3",
    "node-cmd": "^3.0.0",
    "serve-static": "^1.13.2",
    "vega-embed": "^3.14.0"
  },
  "devDependencies": {
    "electron-builder": "^20.28.3",
    "electron-packager": "^12.1.1"
  }
}

Полное сообщение об ошибке:

tf-core.esm.js:17 Uncaught (in promise) Error: The shape of dict['input'] provided in model.execute(dict) must be [1,224,224,3], but was [1,224,224,3]
    at Object.assert (tf-core.esm.js:17)
    at tf-converter.esm.js:17
    at Array.forEach (<anonymous>)
    at e.checkInputShapeAndType (tf-converter.esm.js:17)
    at e.execute (tf-converter.esm.js:17)
    at e.execute (tf-converter.esm.js:17)
    at e.predict (tf-converter.esm.js:17)
    at tf.tidy (index.js:181)
    at tf-core.esm.js:17
    at e.scopedRun (tf-core.esm.js:17)
assert @ tf-core.esm.js:17
(anonymous) @ tf-converter.esm.js:17
e.checkInputShapeAndType @ tf-converter.esm.js:17
e.execute @ tf-converter.esm.js:17
e.execute @ tf-converter.esm.js:17
e.predict @ tf-converter.esm.js:17
tf.tidy @ index.js:181
(anonymous) @ tf-core.esm.js:17
e.scopedRun @ tf-core.esm.js:17
e.tidy @ tf-core.esm.js:17
e.tidy @ tf-core.esm.js:17
main @ index.js:180
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...