Sorry, MaxPool2d with index output is not supported in ONNX (https://github.com/onnx/onnx/blob/master/docs/Operators.md#maxpool 39) so PyTorch can’t directly export it.
I filed a bug for you here: https://github.com/onnx/onnx/issues/417 74