PreTrained Model has no attribute 'copy'

the mobilenet model was trained in an earlier session and downloaded to local machine , it shows this error when inference is carried out at another instance

i trained and saved another instance and the error message is the same

You are currently saving the string 'model.state_dict()', not the real state_dict object.
Use torch.save(model.state_dict(), 'mobilenet_68.pth') instead.

PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier and allows the forum search to index the post. :wink:

Thanks @ptrblck , that was really stupid from me