getting error while using '@tensorflow-models/mobilenet' in bare react-native project.
See original GitHub issueI am getting error while using ‘@tensorflow-models/mobilenet’ in bare react-native project. I am referring this documentation: https://blog.tensorflow.org/2020/02/tensorflowjs-for-react-native-is-here.html my code is as below :
import React, { useEffect } from 'react';
import { View, Text } from 'react-native';
import * as mobilenet from '@tensorflow-models/mobilenet';
export default TensorflowLite = () => {
const load = async () => {
try {
// Load mobilenet.
const model = await mobilenet.load();
console.log(model);
} catch(err) {
console.log(err);
}
}
useEffect(() => {
load();
}, []);
return <View>
<Text>This is demo app.</Text>
</View>
}
The error I am getting is:
Please let me know How can I fix it. Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12
Top Results From Across the Web
React Native Error: Project with path ':expo-modules-core ...
I have tried updating Expo as well as installing an older version of it instead and I'm still getting the same error. Not...
Read more >Installation in React Native and bare projects
Learn how to configure development builds for bare React Native projects. The installation steps on this page are only required to add the...
Read more >react-native-in-app-review - npm
Unexpected error occur may return different error from different user and device check code number to get discovered errors messages that could ...
Read more >How To Eject From Expo Managed Workflow to Bare? - Pagepro
To start with the managed workflow what developers need to know is ... Why using Expo instead of starting with a plain React...
Read more >React Native Firebase
Welcome to React Native Firebase! To get started, you must first setup a Firebase project and install the "app" module.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @suneeltechnew, I updated the repo with an additional project generated from react native CLI. I found the problem to be the incompatibility between
react-native
0.65.1 andexpo-gl
10.4.2. I downgradedreact-native
to 0.63.2 and it works fine on my Pixel 2. (0.65.1 would crash my phone caused by GL context creation failure).Please give it a try. Thanks!
Hi @anhquan291 please see here: https://github.com/tensorflow/tfjs-examples/tree/master/react-native/image-classification/react-native-cli