Problems converting pytorch model into ONNX

RuntimeError: symbolic for max_pool2d returned None for the output 1 (indicating conversion for that particular output is not supported), but the network uses this output later

my maxpool2d operation with remembering the index if there is doesn’t support

Sorry, MaxPool2d with index output is not supported in ONNX (https://github.com/onnx/onnx/blob/master/docs/Operators.md#maxpool) so PyTorch can’t directly export it.

I filed a bug for you here: https://github.com/onnx/onnx/issues/417

@Pengfei_Wang
Could you please give more details about your use case, such as the PyTorch model? This is very helpful for us to improve our ONNX spec.

Hi,

Interchange return parameters of “max_pool2d_with_indices” function in PYTHON_INSTALLATION_PATH/site-packages/torch/onnx/symbolic.py file.

Try this modification and let me know if it works or not.

:smile: