Weights saved in TorchScript?


Sorry if my question is too simple or naive but I’m new in jit/TorchScript.

I have saved a model with torch.jit.script after the training loop and want to load it in C++ for inference using the torchlib. Is it enough to save the model in this way to keep the trained weights or should I do something more?

It should be enough to export the model via torch.jit.save as described in this tutorial.

1 Like

Thanks for your reply