How to load a saved unet from fastai into pytorch?

I’ve saved a unet_learner (that has a resnet50 as a base model) as a .pth file. I’m trying to use the saved model in production using just pytorch, rather than fastai. What would be the easiest way to do this?
Pytorch doesn’t have the capability to generate a unet from a base model like fastai has. So would I need to custom define my pytorch model class?


I am also looking for the same

I ran into the same situation and solved it in this way. Please have a look.