Open creatornadiran opened 3 years ago
did you have the issue resolved?
you could try with the official .pt
If it works, it might be because the .pt file you supplied earlier was in a different (newer) torch version
I solved it by
# model is loaded into cpu
model.eval()
quantized_model = torch.quantization.convert(model)
scripted_model = torch.jit.script(quantized_model)
opt_model = optimize_for_mobile(scripted_model)
opt_model.save('model.pt')
both load model and predict runs well for me and here is my platform info OS: Windows 10 Device: Android 10 PyTorch: 1.13.0 pytorch_mobile: ^0.2.2
OS: Windows 11 Package: Anaconda pytorch_mobile: ^0.2.1 PyTorch : 1.8.1
I'm getting this error when trying to load the model:
All my save types:
I tried all the files and got the same error. Is there a version issue? How can I save my model properly?