Closed BhagwatSagar30 closed 3 years ago
You'll need to import '@tensorflow/tfjs-react-native';
to use the rn-webgl backend. See here for an example.
@mattsoulanille even i'm getting the same issue even after adding import '@tensorflow/tfjs-react-native';
It says
Error: Backend name 'rn-webgl' not found in registry
If i remove the setBackend() function, then it throws different error
TypeError: undefined is not an object (evaluating 'env().platform.fetch')
This stopped working from 2-3 days back in existing release builds
@sndkd @mattsoulanille @rthadur did you find any solution for this ? I'm also facing the same issue from yesterday in iOS react native 0.63 Error: Backend name 'rn-webgl' not found in registry
@mattsoulanille I'm still getting same error after adding import '@tensorflow/tfjs-react-native';
Thank you all for your patience, we are investigating this and we will find more details soon. @BhagwatSagar30 can you try using latest tfjs-version ? @sndkd @utills can you please share your package.json ?
Also if possible can you please look at these steps if applicable
I'm having trouble reproducing this. Here's my test repo, where the backend loads properly. I've tested on an Android phone, but this might be iOS-specific. I'll try on an iOS simulator and let you know what I find.
I couldn't get the simulator working, so I tried on an iPhone SE running iOS 14.3. It worked there as well. Can you try the test repo on your device and let me know if it works? Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
Closing as stale. Please @mention us if this needs more attention.
Does anyone got the error fixed? I am on @tensorflow/tfjs": "4.1.0", "@tensorflow/tfjs-react-native": "^1.0.0" and still facing the same issue
We are getting an error while setting the backend name as "rn-webgl" in react native.
Sample code of implementation.
import * as tf from "@tensorflow/tfjs";
await tf.setBackend("rn-webgl"); await tf.ready();
We are using the following version of the library. "expo-camera": "9.1.1", "expo-font": "^8.3.0", "expo-gl": "9.2.0", "expo-gl-cpp": "9.2.0", "expo-av": "^8.6.0", "@tensorflow-models/blazeface": "0.0.5", "@tensorflow-models/knn-classifier": "1.2.2", "@tensorflow-models/posenet": "2.2.1", "@tensorflow/tfjs": "2.7.0", "@tensorflow/tfjs-react-native": "0.5.0", "react": "16.13.1", "react-native": "0.63.3",
Please help with this.
Thanks in advance.