Is there a way to convert a local PyTorch model to Torch Scipt Model?

Hi, guys, I’m learning PyTorch and a total beginner.
How do I convert a downloaded PyTorch model ( to Torch Scirpt Model. I have tried to use Python packages, torchvision and torch, but I have no idea how to load a model form local path.
Any help would be appreciated.

I don’t know what’s exactly stored in this file, but the common workflow would be to create a model instance and load its state_dict as seen in this code snippet:

model = MyModel()

The code works fine. Thank you very much