-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Squeezenet model ONNX export #690
Comments
Hi, About your questions: 1 - I believe SqueezeNet was originally developed in Caffe, for which the implementation of |
@lara-hdr Hi how you convert it? Can you give an instruction? I meet the error that
|
@ywang370, what version of pytorch are you using? |
@lara-hdr Thanks for the link, very helpful! |
Hi, I cloned and built the latest PyTorch master from GitHub and I exported the pretrained SqueezeNet model to ONNX with it. I didn't have any trouble doing that. I then exported the model with Caffe 2 mobile exporter to an init_net.pb and a predict_net.pb file, in order to use it with the AI Camera example :https://github.com/cedrickchee/pytorch-android. I executed the exported files using "predictor" in Python and it worked perfectly. However, when I try to execute the model with predictor in Android, the app crashes. It doesn't happen with other models (e.g. MobileNet V2) or with the SqueezeNet protobuf files included in the AI Camera example. Obviously, I also built/updated the Caffe 2 libraries for Android using the build_android.sh script from PyTorch master before trying to execute the model. I provide some more detail in here: cedrickchee/pytorch-android#6 Thanks. |
Hi,
I have some questions regarding the squeeznet model.
I failed at exporting the model to ONNX with the following error "ONNX export failed : Couldn't export operator aten:max_pool2d_with_indices".
I noticed that in /torch/onnx/symbolic.py , the use of "ceil_mode" is not supported in max_pool2d_with_indices.
After setting "ceil_mode" to False for all occurrences of "MaxPool2d", the export succeeds.
I also noticed that, when using the exported model mentioned above, the Pytorch results do not match the ONNX results, the reason being the use of "nn.Dropout(0.5)".
My questions are :
Thanks
The text was updated successfully, but these errors were encountered: