Hello Everyone. I was able to load the .pt file in python. But when I tried to load the same model in Java Android I was facing this issue.
Android Java Version:
‘org.pytorch:pytorch_android:1.6.0’
‘org.pytorch:pytorch_android_torchvision:1.7.0’
Python Version:
pytorch:1.6
 Caused by: com.facebook.jni.CppException: [enforce fail at inline_container.cc:222] . file not found: archive/constants.pkl
(no backtrace available)
    at org.pytorch.NativePeer.initHybrid(Native Method)
    at org.pytorch.NativePeer.<init>(NativePeer.java:23)
    at org.pytorch.Module.load(Module.java:24)
    at org.pytorch.Module.load(Module.java:34)
    at org.pytorch.helloworld.MainActivity.onCreate(MainActivity.java:39)
    at android.app.Activity.performCreate(Activity.java:7136)
    at android.app.Activity.performCreate(Activity.java:7127)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)

So please let me know,  do I need to make any changes in Java Code while loading the model because I was able to load the sample model provided by the PyTorch Android team(version 1.4.0).
Is it related to versioning of pytorch? And Is pytorch java and pytorch versioning similar?