android-demo-app icon indicating copy to clipboard operation
android-demo-app copied to clipboard

fix "Lite Interpreter verson number does not match"

Open doutv opened this issue 3 years ago • 1 comments

Fix the bug in Issue #202

When I run HelloWorldApp, I met this error: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.pytorch.helloworld/org.pytorch.helloworld.MainActivity}: com.facebook.jni.CppException: Lite Interpreter verson number does not match. The model version must be between 3 and 5But the model version is 8 ()

My solution:

  1. Specify the LTS version (can be found here) of torch and torchvision when running pip install. I also add a requirements.txt here.
  2. Upgrade org.pytorch:pytorch_android_lite and org.pytorch:pytorch_android_torchvision_lite to latest version 1.12.2.
  3. I also update README corresponding to the above changes.

doutv avatar Oct 20 '22 13:10 doutv

@doutv Hello. I am getting the following error and I don't know how to fix it. com.facebook.jni.CppException: Lite Interpreter version number does not match. The model version must be between 3 and 7 but the model version is 8 ()

Can you please give me some tips or direction how to fix the error to be able launch the object detection app.

HripsimeS avatar Dec 13 '22 17:12 HripsimeS