open-mmlab / mmcv

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

can not find _BatchNorm in mmengine #3054

Open lsj1111 opened 3 months ago

lsj1111 commented 3 months ago

Prerequisite

Environment

mmcv 2.0.1

Reproduces the problem - code sample

from mmcv.utils import (IS_NPU_AVAILABLE, _BatchNorm, )

Reproduces the problem - command or script

In the mmcv1.x , the method of _BatchNorm is in the mmcv.utils,but now in the mmcv 2.x ,it does not exist,and i can't find it in the mmengine

Reproduces the problem - error message

ImportError: cannot import name '_BatchNorm' from 'mmcv.utils' (D:\Tool\Anaconda\Anaconda\envs\openmmlab\lib\site-packages\mmcv\utils__init__.py)

Additional information

In the mmcv1.x , the method of _BatchNorm is in the mmcv.utils,but now in the mmcv 2.x ,it does not exist,and i can't find it in the mmengine

inbook58 commented 1 month ago

I found it in parrots_wrapper.py