Skip to content

No module named 'onnx.optimizer' #3758

Closed Answered by jcwchen
giaxxi asked this question in Q&A
Oct 6, 2021 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@jcwchen
Comment options

@bouachalazhar
Comment options

@jcwchen
Comment options

@bouachalazhar
Comment options

@jcwchen
Comment options

Answer selected by jcwchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
optimizer Issues related to ONNX optimizers
3 participants