How to Load a pre-train fastai model weight and opt into the plain Python Resnet model?

I still do not know how to load a trained model from fastai and load it into the pain Python Resnet model, so I can use it like model(x.unsquzee()).

I know I need to load the stat_dic of model and opt, but I don’t know how too. I tried it, and it fails. Every time I use to learn.model(input), it will not perform as well as the learn.predict function

Help and Thank You.

In fact, I just want to extract feature of Resnet34 or Resnet50 just like lesson7. Thus, I want to use learn.model for it. But I am worried it won’t work because it can not perform as well as learn.predict.