How do I save a trained fastai model as a pytorch model?
The ConvLearner class contains the Pytorch model:
torch.save(learner.model.state_dict(), "path/to/save/filename")
You can read more about torch’s preferred method of saving models here.
2 Likes