Getting similar error like this
TypeError: ord() expected a character, but string of length 0 found
when loading my saved model
model_transfer = torch.load('weights/model_transfer.pt', map_location='cpu')
Even tried to load modified pretrained model architecture throwing same error

from my_models import model_transfer
model_transfer.load_state_dict(torch.load('weights/model_transfer.pt', map_location='cpu'))
model

Help!!