pytorch / android-demo-app

PyTorch android examples of usage in applications
1.46k stars 604 forks source link

Getting CppException: Lite Interpreter version number does not match #206

Closed stefan-falk closed 2 years ago

stefan-falk commented 2 years ago

Running the Android app after generating the model throws the following error:

E/AndroidRuntime: FATAL EXCEPTION: Thread-2
    Process: org.pytorch.demo.speechrecognition, PID: 10645
    com.facebook.jni.CppException: Lite Interpreter verson number does not match. The model version must be between 3 and 5But the model version is 7 ()
    Exception raised from parseMethods at ../torch/csrc/jit/mobile/import.cpp:320 (most recent call first):
    (no backtrace available)
        at org.pytorch.LiteNativePeer.initHybrid(Native Method)
        at org.pytorch.LiteNativePeer.<init>(LiteNativePeer.java:23)
        at org.pytorch.LiteModuleLoader.load(LiteModuleLoader.java:29)
        at org.pytorch.demo.speechrecognition.MainActivity.recognize(MainActivity.java:197)
        at org.pytorch.demo.speechrecognition.MainActivity.run(MainActivity.java:183)
        at java.lang.Thread.run(Thread.java:923)

Is this a dependency issue?

Treshank commented 2 years ago

Duplicate of #202. I think

stefan-falk commented 2 years ago

@Treshank indeed! Thanks for linking!