Skip to content

Error when loading the model saved #20

Open
@ParusMajor60

Description

@ParusMajor60

Hi,

I modified your code to train a model with my own dataset, and I am trying to load the model saved as "latest.pth" to do some tests. However, I am getting this error:

AttributeError: 'DenseNet' object has no attribute 'copy'

The code I use to load the model is:

net.load_state_dict(torch.load(checkpoint, map_location=lambda storage, loc: storage))

where checkpoint is the path to "latest.pth"

Any help would be appreciated.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions