-
I'm using this script to convert a model: https://github.com/facebookresearch/detectron2/blob/f5e4c452bba854b8ed14a7240f51720ca7857e91/tools/deploy/export_model.py#L220 For example using:
I get the following error:
The installed ONNX version is the latest:
Even if I import ONNX in a fresh Colab and try to import Any way to fix it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hi @giaxxi, Which PyTorch are you using? You should not bump into this error with the latest PyTorch because it seems they has already handled it: pytorch/pytorch#55889. If you are using an old version of PyTorch, using ONNX <= 1.8.1 would be a quick workaround. But, I would suggest you use the latest PyTorch with latest optimizer from onnx/optimizer repo because the new optimizer has been much improved from the old one. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi @giaxxi,
ONNX has moved optimizer to another repo since 1.9.0: https://github.com/onnx/onnx/releases/tag/v1.9.0
Which PyTorch are you using? You should not bump into this error with the latest PyTorch because it seems they has already handled it: pytorch/pytorch#55889. If you are using an old version of PyTorch, using ONNX <= 1.8.1 would be a quick workaround. But, I would suggest you use the latest PyTorch with latest optimizer from onnx/optimizer repo because the new optimizer has been much improved from the old one. Thanks.