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 ()
Exception raised from parseMethods at …/torch/csrc/jit/mobile/import.cpp:320 (most recent call first):
(no backtrace available)
I converted my GAN model to .ptl and then I tried to load the .ptl file in the same way as mentioned in this sample. I am consistently getting the above error
I was able to fix my issue with your solution, but now, though the app works, the classification result changes and is wrong now.
Any idea how to fix this?
Also one more observation.
The repository provides a script named trace_model.py to create a PyTorch Mobile model file.
I used the same script to generate the model.
If the extension is .pt, I don’t even face the above problem and everything works perfectly fine.
If i rename the extension to .ptl, I get the problem, and after fixing it using your solution, the problem goes away, but classification results go for a toss.
Overall file is same, just changing extension causes problems.
@kartikpodugu , I think you should export the model to .ptl file through mobile lite interpreter, just renaming it form .pt to .ptl will not work accurately