ezyang / onnx-pytorch

PyTorch development for onnx
21 stars 4 forks source link

Implement export for AdaptiveMaxPool as GlobalPooling #42

Open dzhulgakov opened 7 years ago

dzhulgakov commented 7 years ago

For special case when adaptive pooling used to collapse the output dimension completely (output_size=(1,1)) we should just emit GlobalAveragePooling in ONNX. And complain otherwise.

Scitator commented 6 years ago

Hi @dzhulgakov ! Is there any updates about this issue? I have just the same problem - I use nn.AdaptiveMaxPool2d((1, 1)) and model becomes unconvertable. It would be great, if you post any hack to solve this problem. Thanks!