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

pytorch->onnx->ncnn flatten(squueze) problem #576

Closed
ForestWang opened this issue Sep 17, 2018 · 1 comment
Closed

pytorch->onnx->ncnn flatten(squueze) problem #576

ForestWang opened this issue Sep 17, 2018 · 1 comment

Comments

@ForestWang
Copy link

Dear Sir:

  1. I trained the model with pytorch, the forward has below operations:
    x = self.avgpool(x)#x=[1,1024,1,1]
    x = x.view(x.size(0), -1)
    x = self.fc(x)

I can convert the pytorch model to onnx successfully, but when convert onnx model to ncnn, got "flatten not supported yet" problem.

  1. then i change the forward code to:
    x = self.avgpool(x)#x=[1,1024,1,1]
    x = torch.squeeze(x,2)
    x = torch.squeeze(x,2)
    x = self.fc(x)
    I can convert the pytorch model to onnx successfully too, but when convert onnx model to ncnn, got "squeeze not supported yet" problem.

i have no idea on how to resolve this problem.
could you help @nihui ?
thank you very much!

@nihui
Copy link
Member

nihui commented Dec 15, 2018

flatten support added bbe044f

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

2 participants