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

ImportError: cannot import name 'ConvBNReLUFusion' from 'torch.quantization.fx.fusion_patterns' #268

Open
huangweiwh opened this issue Apr 15, 2024 · 5 comments

Comments

@huangweiwh
Copy link

When I try to ptq mobilenetv2, I get an error: "ImportError: cannot import name 'ConvBNReLUFusion' from 'torch.quantization.fx.fusion_patterns'"

@corin-lyz
Copy link

Have you solved this problem? I also encountered this problem

@wuchangli
Copy link

wuchangli commented Jun 17, 2024

torch==1.10.0 has this, but the newest torch removed it. How do adapt it to the newest torch?

@ardeal
Copy link

ardeal commented Aug 2, 2024

I am able to solve this problem.

  1. if you install torch 1.10.0, you are not able to install other related packages.
  2. if you run MQBench on the latest torch, you are not able to import those mudules as which is removed by Pytorch.

I have already update this module and run it on the latest torch. The quantization accuracy is also good.

@bieyl
Copy link

bieyl commented Sep 2, 2024

@ardeal ImportError: cannot import name 'ConvBNReLUFusion' from 'torch.quantization.fx.fusion_patterns'
How do you sovle it? My torch version is 2.4.0, but i need to use the corresponding CUDA. So do you heve the good sollution?

@bieyl
Copy link

bieyl commented Sep 10, 2024

I am able to solve this problem.

  1. if you install torch 1.10.0, you are not able to install other related packages.
  2. if you run MQBench on the latest torch, you are not able to import those mudules as which is removed by Pytorch.

I have already update this module and run it on the latest torch. The quantization accuracy is also good.

Hello @ardeal ImportError: cannot import name 'ConvBNReLUFusion' from 'torch.quantization.fx.fusion_patterns'
How do you sovle it? My torch version is 2.4.0, but i need to use the corresponding CUDA. So do you heve the good sollution?

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

No branches or pull requests

5 participants