Skip to content

Failed when forwarding the model of resnet50 in NCNN  #40

Description

@unanan

Hi All,
I'm now confused with a problem of forwarding the model in NCNN.
The model is resnet50 trained under PyTorch1.0. I delete all the keys with "num_batches_tracked"of the state_dict created by the code:torch.load(model_path).
It succeeded in converting the model, but failed when run:

ncnn::Mat feature;
ex.extract("Addmm_1", feature);

in my C++ codes.
exis a ncnn::Extractor, which can successfully extract all the layers' outputs except the last layer:Addmm_1.
Addmm_1 is converted from:

self.fc = nn.Linear(512 * block.expansion, feature_dimension)

in my Python codes.

Anyone have ever suffered the same problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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