Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

感受野计算出错 #25

Open
zhaoxin111 opened this issue Dec 30, 2020 · 1 comment
Open

感受野计算出错 #25

zhaoxin111 opened this issue Dec 30, 2020 · 1 comment

Comments

@zhaoxin111
Copy link

您好,我尝试将您实现的感受野计算工具迁移至mmdetv2中去,但一直计算出错
尝试retinanet感受野计算,报以下错
Traceback (most recent call last):
File "tools/receptive_analyze.py", line 45, in
analyze_receptive(cfg, input_shape, index)
File "tools/receptive_analyze.py", line 36, in analyze_receptive
calc_receptive_filed(model, input_shape, index)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/core/utils/receptivefield.py", line 103, in calc_receptive_filed
cal_model.compute(input_shape, [index])
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/core/utils/receptivefield.py", line 54, in compute
replace_names_dict(self._model)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/core/utils/misc.py", line 86, in replace_names_dict
_get_names(model)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/core/utils/misc.py", line 73, in _get_names
_get_names(m, parent_name=name)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/core/utils/misc.py", line 78, in _get_names
module._modules[key] = Linear()
NameError: name 'Linear' is not defined

尝试faster rcnn时,报以下错
Traceback (most recent call last):
File "tools/receptive_analyze.py", line 45, in
analyze_receptive(cfg, input_shape, index)
File "tools/receptive_analyze.py", line 34, in analyze_receptive
model = create_model(cfg)
File "tools/receptive_analyze.py", line 29, in create_model
model = build_detector(cfg.model, train_cfg=None, test_cfg=None)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/models/builder.py", line 67, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/models/builder.py", line 32, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/zhaoxin/workspace/mmcv/mmcv/utils/registry.py", line 171, in build_from_cfg
return obj_cls(**args)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/models/detectors/faster_rcnn.py", line 24, in init
pretrained=pretrained)
File "/home/zhaoxin/workspace/mmdetection/tools/../mmdet/models/detectors/two_stage.py", line 34, in init
rpn_head_.update(train_cfg=rpn_train_cfg, test_cfg=test_cfg.rpn)
AttributeError: 'NoneType' object has no attribute 'rpn'

@hhaAndroid
Copy link
Owner

这应该有些问题,我后面自己测试并且迁移到mmdet吧,我现在也维护mmdet,弄起来耶方便

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants