@botelho Sry, but I got confused.
You original said torch::save(model, "model.pt"); got compile error. If you solved this problem, then you should be able to load your saved model.pt in python using torch.jit.load which is within the link that I pasted earlier in this post, no?
here is the link ‘Load saved file from LibTorch to PyTorch failed - #5 by glaringlee 2’
Please make sure the version of libtorch and pytorch must match.