Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

fix "Lite Interpreter verson number does not match" #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doutv
Copy link

@doutv doutv commented Oct 20, 2022

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.

1. pip install specifying the LTS version of torch and torchvision
2. upgrade org.pytorch:pytorch_android_lite and org.pytorch:pytorch_android_torchvision_lite to 1.12.2
@HripsimeS
Copy link

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants