onnx2torch
onnx2torch copied to clipboard
NotImplementedError: Average pool operation with spatial rank == -2 is not implemented
BUG Log: Traceback (most recent call last): File "/opt/conda/envs/tf2onnx/lib/python3.7/site-packages/onnx2torch/node_converters/average_pool.py", line 29, in _ avgpool_class = _AVGPOOL_CLASS_FROM_SPATIAL_RANK[spatial_rank] KeyError: -2
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "issue_onnx2torch_001.py", line 4, in
Code to reproduce: from onnx2torch import convert
onnx_model_path = "vgg19-imagenet_origin-MDtype4-NLAll9-MDtype24-MDims26.onnx" torch_model = convert(onnx_model_path)
the onnx file can be acquired at https://drive.google.com/file/d/1lfGz41_pFvQwJYsZxuPPX53dLzzWYKBx/view?usp=sharing