Trying to Save and Load resnet50 net

ERROR PyTorch 0.1.11

What’s object? You didn’t show that in your snippet.

You don’t need to implement torch.load. Just call it with the file name. Also, note that we recommend using state_dict() and load_state_dict() for serialization.

I edited the code above to include all of the model, including training code.

It looks like I am using incorrectly. What is object supposed to refer to?
I am still unsure of what would be the correct way to use to save it and to load it, while keeping the resnet50 architecture?

Would this be correct?, "/home/ubuntu/pics/test3.pth")

Hmm, ok I will look into state_dict()
It looks like the documentation on state_dict() is a bit sparse. Do you have any pointers on how to edit the code above to save and load using state_dict and load_state_dict()?

Thanks again

You still haven’t included the definition of object in the snippet. I have no idea what it is

Hi again,

I managed to figure it out, thanks for the help!