question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'torch.ao.quantization.quantize_fx'

See original GitHub issue

Instructions To Reproduce the 🐛 Bug:

  1. Run Jupyter Notebook in Google Colab.

Expected behavior:

D2Go should work with PyTorch version 1.10.0+cu111.

Possible fix:

Change:

from torch.ao.quantization.quantize_fx import prepare_fx, prepare_qat_fx, convert_fx

to

from torch.quantization.quantize_fx import prepare_fx, prepare_qat_fx, convert_fx

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cloveropencommented, Nov 25, 2021

in Jupyter Notebook,open the /usr/local/lib/python3.7/dist-packages/d2go/modeling/meta_arch/rcnn.py and modify as from torch.quantization.quantize_fx import prepare_fx, prepare_qat_fx, convert_fx

0reactions
wat3rBrocommented, Sep 16, 2022

@mythri1996 I haven’t tried d2go/mobile-vision + google colab, but assume you can install them using pip following https://github.com/facebookresearch/d2go#installation

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'torch.ao' 报错解决
No module named 'torch.quantization.qconfig' 这个由于torch 版本问题,1.3版本的文件名QConfig 因此重新引用下依赖,将torch 版本升为1.4即可!!!
Read more >
Quantization — PyTorch 1.13 documentation
A quantized model executes some or all of the operations on tensors with reduced precision rather than full precision (floating point) values. This...
Read more >
no module named 'torch.ao' - You.com | The AI Search Engine ...
Root Cause of modulenotfounderror: no module named 'torch' Most of the time you can get the ModuleNotFoundErrro when the package is not installed...
Read more >
Quantization — PyTorch master documentation
torch.nn.intrinsic.quantized — quantized version of fused layers for inference (no BatchNorm variants as it's usually folded into convolution for inference):.
Read more >
Cannot import name 'QuantStub' from 'torch.ao.quantization'
1 import fastbook File ~/miniconda3/envs/fastbook/lib/python3.9/site-packages/fastbook/__init__.py:3, in <module> 1 __version__ = "0.0.18" 2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found