open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.91k stars 1.65k forks source link

[Bug] ModuleNotFoundError: No module named 'mmcv.cnn.utils.weight_init' #3045

Open xioaxin opened 8 months ago

xioaxin commented 8 months ago

Prerequisite

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 truncnormal

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 truncnormal'. How can I do to fix these error.

Additional information

No response

furycurry commented 2 days ago

hello @xioaxin . Were you able top solve this issue?