ModuleNotFoundError: No module named 'torch.ao.quantization.quantize_fx'
See original GitHub issueInstructions To Reproduce the 🐛 Bug:
- 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:
- Created 2 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
@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