我用re-resnet50替换其他特征提取网络时发生了错误,能帮我解答吗,问题如下。
myheal000 opened this issue · comments
File "/kaggle/input/mytest068/tools/train.py", line 153, in
main()
File "/kaggle/input/mytest068/tools/train.py", line 149, in main
meta=meta)
File "/kaggle/working/newobb/mmdet/apis/train.py", line 133, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 130, in run
epoch_runner(data_loaders[i], **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 51, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter
**kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 75, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "/kaggle/working/newobb/mmdet/models/detectors/base.py", line 237, in train_step
losses = self(**data)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/kaggle/working/newobb/mmdet/core/fp16/decorators.py", line 51, in new_func
return old_func(*args, **kwargs)
File "/kaggle/working/newobb/mmdet/models/detectors/base.py", line 172, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/kaggle/working/newobb/mmdet/models/detectors/obb/obb_two_stage.py", line 154, in forward_train
x = self.extract_feat(img)
File "/kaggle/working/newobb/mmdet/models/detectors/obb/obb_two_stage.py", line 86, in extract_feat
x = self.neck(x)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/kaggle/working/newobb/mmdet/core/fp16/decorators.py", line 51, in new_func
return old_func(*args, **kwargs)
File "/kaggle/working/newobb/mmdet/models/necks/fpn.py", line 173, in forward
for i, lateral_conv in enumerate(self.lateral_convs)
File "/kaggle/working/newobb/mmdet/models/necks/fpn.py", line 173, in
for i, lateral_conv in enumerate(self.lateral_convs)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/cnn/bricks/conv_module.py", line 201, in forward
x = self.conv(x)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 420, in _conv_forward
self.padding, self.dilation, self.groups)
TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not GeometricTensor
You can transform a GeometricTensor to standard tensor by changing this line to outs.append(x.tensor)
ReDet/mmdet/models/backbones/re_resnet.py
Line 529 in f4a8e7d