Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'optimizer' from 'onnx' #139

Open
avani17101 opened this issue Jan 17, 2022 · 5 comments
Open

cannot import name 'optimizer' from 'onnx' #139

avani17101 opened this issue Jan 17, 2022 · 5 comments
Labels

Comments

@avani17101
Copy link

Describe the bug
While running

import pytorch2keras 
k_model = pytorch2keras (model_pt, input_var, [(3, 32, 32,)], verbose=True, names='short')  

I am getting the following error:
image

I am using ubuntu20.04, onnx-1.10.2 pytorch2keras-0.2.4

@avani17101 avani17101 added the bug label Jan 17, 2022
@Baionikke
Copy link

You have to uninstall current version of onnx and reinstall 1.8.1 version, because the optimizer is not further supported from this version on.
This worked for me.

@HarHarLinks
Copy link

dupe of #132

@bourcierj
Copy link

bourcierj commented Apr 11, 2022

I got the same error when installing pytorch2keras from PyPI. The version available on PyPI is outdated. A fix was merged on master (and not yet available on PyPI). I got it working by pip installing the package directly from GitHub.

@HksH143
Copy link

HksH143 commented Oct 25, 2023

@bourcierj i was able to fix the issue as well by simply installing from the github repo rather then directly installing from pypl

@Magnificent-01
Copy link

@HksH143 @bourcierj 请问一下有这个github pip安装包? 为什么我找不到 在哪?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants