Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed when forwarding the model of resnet50 in NCNN #40

Open
unanan opened this issue Mar 7, 2019 · 0 comments
Open

Failed when forwarding the model of resnet50 in NCNN #40

unanan opened this issue Mar 7, 2019 · 0 comments

Comments

@unanan
Copy link

unanan commented Mar 7, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant