DEV Community

Discussion on: Image Classification on React Native with TensorFlow.js and MobileNet

Collapse
 
avnouche05 profile image
avnouche05 • Edited

hi Aman , I tried your tutorial but I have an error saying that this.renderPrediction is not a function and I can't continue my project cuz of this error can you help me please ?

Collapse
 
amanhimself profile image
Aman Mittal

Are you using the same tfjs package version as mentioned in the demo project repo? The recent version of tfjs with React Native has lots of changes.

Collapse
 
avnouche05 profile image
avnouche05 • Edited

i had to do fews changes because I met fews issues basically everything works , the only problem that I have is the function this.renderPrediction , so just to see I erased it from my code and I can see the predictions on the console but on the application it keeps showing me " predicting ...."
I send u all my imports in the picture I'll join to my message
thx for your answer ;)
dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
 
avnouche05 profile image
avnouche05

I can show you the entire code if you want :)

Thread Thread
 
amanhimself profile image
Aman Mittal

Hey, I know you are facing problem. Your import statements seems fine. At the time of writing this tutorial, tfjs only supported to load models via a network call. Now, with the latest version, you can try the and load the modal from the app.

Thread Thread
 
avnouche05 profile image
avnouche05

yeah I know I can create my own model by coding it with python ( correct me if I'm wrong )
fews more questions :
1) do you know how to do it , I found a tutorial on the web page of tensorflow , they explain how to make it
2) also , can I use the same code that you used for your tutorial when I will import a external model ?
thx u a lot for answering my questions :)