Handpose tfjs Error - No backend found in registry

我是研究僧i 提交于 2020-06-17 00:03:02

问题


When trying to run a demo project for Handpose tfjs, I get the below error.

My package.json file has below dependencies:

{
"name": "tensorflowJs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
  "watch": "cross-env NODE_ENV=development parcel index.html --no-hmr ",
  "build": "cross-env NODE_ENV=production parcel build index.html --public-url ./"
 },
"browser": {
"crypto": false
 },
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
  "@tensorflow-models/handpose": "0.0.4",
  "@tensorflow/tfjs-backend-wasm": "^2.0.0",
  "@tensorflow/tfjs-converter": "^1.7.4",
  "@tensorflow/tfjs-core": "^2.0.0",
  "@tensorflow/tfjs-node": "^2.0.0",
  "bootstrap": "^4.5.0",
  "cross-env": "^7.0.2"
 },
"devDependencies": {
  "@babel/cli": "^7.10.1",
  "@babel/core": "^7.10.2",
  "@babel/plugin-transform-runtime": "^7.10.1",
  "@babel/polyfill": "^7.10.1",
  "@babel/preset-env": "^7.10.2",
  "babel-preset-env": "^1.7.0",
  "parcel-bundler": "^1.12.4"
 }
}

The issue with the registry was supposed to be resolved after version 0.10.3, but even for version-2, I'm still facing the issue. Does anyone know why this issue occurs?


回答1:


<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-converter"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgl"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/handpose"></script>

Tensorflow released 2.0.0, and now you must choose either tfjs-backend-webgl, tfjs-backend-cpu, or tfjs-backend-wasm to run your model. You're using handpose and for that you should use webgl.



来源:https://stackoverflow.com/questions/62134812/handpose-tfjs-error-no-backend-found-in-registry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!