nn.sequential error: tuple is not a Module subclass #9859
Unanswered
qianlian-mozi
asked this question in
General
Replies: 1 comment
-
i find that: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
“Traceback (most recent call last):
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\registry\build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "d:\paper\mmdetection-dev-3.x\mmdetection-dev-3.x\mmdet\models\backbones\halopvtnew.py", line 816, in init
super(HALOPVT_base, self).init(
File "d:\paper\mmdetection-dev-3.x\mmdetection-dev-3.x\mmdet\models\backbones\halopvtnew.py", line 580, in init
stem = nn.Sequential(
File "D:\miniconda\envs\halopvt_new\lib\site-packages\torch\nn\modules\container.py", line 91, in init
self.add_module(str(idx), module)
File "D:\miniconda\envs\halopvt_new\lib\site-packages\torch\nn\modules\module.py", line 381, in add_module
raise TypeError("{} is not a Module subclass".format(
TypeError: tuple is not a Module subclass
Traceback (most recent call last):
File "tools/train.py", line 124, in
main()
File "tools/train.py", line 113, in main
runner = Runner.from_cfg(cfg)
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\runner\runner.py", line 431, in from_cfg
runner = cls(
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\runner\runner.py", line 398, in init
self.model = self.build_model(model)
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\runner\runner.py", line 800, in build_model
model = MODELS.build(model)
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\registry\registry.py", line 548, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\registry\build_functions.py", line 241, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "D:\miniconda\envs\halopvt_new\lib\site-packages\mmengine\registry\build_functions.py", line 135, in build_from_cfg
raise type(e)(
TypeError: class
MaskRCNN
in mmdet/models/detectors/mask_rcnn.py: class `HAL”for stem parts:
stem = nn.Sequential(
nn.Conv2d(
in_channels,
embed_dims_i[0], #
kernel_size=stem_patch_size, # default=4
stride=stem_patch_size),
build_norm_layer(norm_cfg, embed_dims_i[0]),
)
I can't slove this error, please help me !
Beta Was this translation helpful? Give feedback.
All reactions