PyTorch 1.0 loading VGGFace2 weights in Python3.7

I am using Python3.7 and PyTorch 1.0 to develop a face recognition system. I want to use VGGFace2 Resnet50 pretrained model as described here as a feature extractor. I have downloaded the model and weights.
I run the following codes as project readme says:

MainModel = imp.load_source('MainModel', '') 
model = torch.load('resnet50_128_pytorch.pth')

First line executed as expected but in the second line i got

‘ascii’ codec can’t decode byte 0xc3 in position 1124: ordinal not in

I searched in the Stackoverflow and Google and i saw that it may be about this model saved with Python2 and loading from Python3 creates a problem. Is there any way that i can solve this?

Thank you.

Have you tried this link

I did but while i save the state dict from Python2 i got KitModel doesn’t have get_item function error appeared. Unfortunately it didn’t work. I think it’s about the custom model

When you try to save the state_dict, did you have the model definition also.

With the model in my case if you mean this

MainModel = imp.load_source('MainModel', '') 

yes i also had the model definition before save

Have you successfully implemented it…I am also trying for the same GitHub links seems to be broken hope you could help …