Closed dikubab closed 1 year ago
It seems that SwinTransformer has been registered elsewhere, you may comment out this line of code and run it again. https://github.com/Sense-GVT/Fast-BEV/blob/dev/mmdet3d/models/backbones/__init__.py#L9
Thank you the problem is solved.
or use .register_module(force=True)
Traceback (most recent call last): File "tools/analysis_tools/get_flops.py", line 6, in
from mmdet3d.models import build_model
..../Fast-BEV/mmdet3d/models/init.py", line 2, in
from .backbones import * # noqa: F401,F403
..../Fast-BEV/mmdet3d/models/backbones/init.py", line 9, in
from .swin_transformer import SwinTransformer
..../Fast-BEV/mmdet3d/models/backbones/swin_transformer.py", line 430, in
class SwinTransformer(nn.Module):
..../miniconda3/envs/mitbev1/lib/python3.8/site-packages/mmcv/utils/registry.py", line 311, in _register
self._register_module(
....miniconda3/envs/mitbev1/lib/python3.8/site-packages/mmcv/utils/registry.py", line 246, in _register_module
raise KeyError(f'{name} is already registered '
KeyError: 'SwinTransformer is already registered in models'