Thanks @tom
Do you know how to save the model after training? It’s a JIT ScriptModule, and it doesn’t support pickle.dump or torch.save . There are open GitHub issues on it. I wonder if you know of a workaround.
It is considered best practice to save the state_dict, i.e. the parameters, rather than the full model. (You need the source anyway to re-instantiate the model.) This is what all pre-trained torchvision models do, too.
The obvious alternative is to trace the model to get a JIT model and save that.