Squeezenet model ONNX export
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
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 :
1- Is there a particular reason "ceil_mode" is being used? and would there be a concern with setting it to False for the export to be possible? I could submit a PR with this change if no concern is noted.
2- Why is "Dropout" used in the model outside of training? Could we remove it?
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Squeezenet ONNX export failure and inspect /torch/onnx/symbolic.py, especially max_pool2d_with_indices and ceil_mode handling. Compare the exported model's results with PyTorch while accounting for the model's nn.Dropout(0.5). Done means the intended ceil_mode and Dropout behavior is decided and the export and output mismatch are addressed or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100