tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.48k stars 1.93k forks source link

react native expo error Initialization of backend rn-webgl failed #3360

Closed stang6787 closed 4 years ago

stang6787 commented 4 years ago

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

TensorFlow.js version

{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@react-native-community/async-storage": "^1.11.0", "@tensorflow-models/mobilenet": "^2.0.4", "@tensorflow/tfjs": "^2.0.0", "@tensorflow/tfjs-react-native": "^0.2.3", "expo": "^37.0.12", "expo-camera": "~8.2.0", "expo-cli": "^3.21.3", "expo-constants": "~9.0.0", "expo-gl": "~8.1.0", "expo-gl-cpp": "~8.1.0", "expo-image-picker": "~8.1.0", "expo-permissions": "~8.1.0", "jpeg-js": "^0.4.0", "react": "~16.9.0", "react-dom": "~16.9.0", "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz", "react-native-fs": "^2.16.6", "react-native-web": "~0.11.7" }, "devDependencies": { "@babel/core": "^7.8.6", "babel-preset-expo": "~8.1.0" }, "private": true }

window 10

react native expo android app tnsorflow/js for image classification

Describe the problem or feature request

Initialization of backend rn-webgl failed

_callee$@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:195872:25 tryCatch@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:26099:23 invoke@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:26275:32 tryCatch@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:26099:23 invoke@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:26175:30 http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:26185:21tryCallOne@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:27455:16 http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:27556:27_callTimer@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:31010:17 _callImmediatesPass@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:31046:19 callImmediates@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:31265:33 callImmediates@[native code] callImmediates@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:3163:35 http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:2940:34 guard@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:3146:15 flushedQueue@http://192.168.0.111:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:2939:21 flushedQueue@[native code] invokeCallbackAndReturnFlushedQueue@[native code]

GitHub issues for this repository are tracked in the tfjs union repository.

Please file your issue there, following the guidance in that issue template.

huurray commented 4 years ago

how did you make it? i have same problem..

"@tensorflow-models/blazeface": "0.0.5",
"@tensorflow-models/posenet": "^2.2.1",
"@tensorflow/tfjs": "^2.6.0",
"@tensorflow/tfjs-react-native": "^0.4.0",
"expo-camera": "^9.0.0",
"expo-gl": "^9.1.1",
"expo-gl-cpp": "^9.1.2",