mmcv
mmcv copied to clipboard
[Bug] ModuleNotFoundError: No module named 'mmcv.cnn.utils.weight_init'
Prerequisite
- [X] I have searched Issues and Discussions but cannot get the expected help.
- [X] The bug has not been fixed in the latest version(https://github.com/open-mmlab/mmcv).
Environment
python: 3.9.18 os: ubuntu 16.04 pytorch: 2.1.0 mmcv: 2.1.0 CUDA: 11.8
Reproduces the problem - code sample
from mmcv.cnn.utils.weight_init import trunc_normal_
Reproduces the problem - command or script
just commonly run python script.
Reproduces the problem - error message
I can successfully install mmcv 2.1.0, however, it gets error when I import these 'from mmcv.cnn.utils.weight_init import trunc_normal_'. How can I do to fix these error.
Additional information
No response