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
In mmdetection,applying DCNv2 in the Res2Net code will cause errors, while DCN will not? #30
Comments
Add contiguous() in line 180 of file: https://github.com/Res2Net/mmdetection/blob/master/mmdet/models/backbones/res2net.py will solve this problem. |
Thank you very much for taking the time to answer my questions,the issue has been solved. |
Thank you very much for taking the time to answer my questions,the issue has been solved^_^
…------------------ 原始邮件 ------------------
发件人: "Shanghua Gao"<notifications@github.com>;
发送时间: 2020年4月17日(星期五) 中午11:00
收件人: "Res2Net/Res2Net-PretrainedModels"<Res2Net-PretrainedModels@noreply.github.com>;
抄送: "夏铭阳"<646711351@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [Res2Net/Res2Net-PretrainedModels] In mmdetection,applying DCNv2 in the Res2Net code will cause errors, while DCN will not? (#30)
Add contiguous() in line 180 of file: https://github.com/Res2Net/mmdetection/blob/master/mmdet/models/backbones/res2net.py
will solve this problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I got 47.6 mAP on val2017 with cascade_rcnn_res2net101_dcnv2_fpn_1x. |
@panjianning 你好,请问下如何添加dcn到res2net中呢,我直接在backbone中添加配置好像不行,报错:AttributeError: 'Bottle2neck' object has no attribute 'conv2'。 |
File "/data/xmy/mmdet_new/mmdetection/mmdet/models/backbones/res2net.py", line 211, in forward
out = _inner_forward(x)
File "/data/xmy/mmdet_new/mmdetection/mmdet/models/backbones/res2net.py", line 181, in _inner_forward
main() sp = self.convsi
File "/home/l547/anaconda3/envs/MMDET_xmy1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
File "./tools/train.py", line 138, in main
meta=meta)
File "/data/xmy/mmdet_new/mmdetection/mmdet/apis/train.py", line 102, in train_detector
result = self.forward(*input, **kwargs)
File "/data/xmy/mmdet_new/mmdetection/mmdet/ops/dcn/deform_conv.py", line 403, in forward
meta=meta)
File "/data/xmy/mmdet_new/mmdetection/mmdet/apis/train.py", line 177, in _dist_train
self.groups, self.deformable_groups)
File "/data/xmy/mmdet_new/mmdetection/mmdet/ops/dcn/deform_conv.py", line 148, in forward
ctx.groups, ctx.deformable_groups, ctx.with_bias)
input tensor has to be contiguous (modulated_deform_conv_cuda_forward at mmdet/ops/dcn/src/deform_conv_cuda.cpp:497)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x6d (0x7ff852af333d in /home/l547/anaconda3/envs/MMDET_xmy1/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: modulated_deform_conv_cuda_forward(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int, int, int, int, int, int, int, int, int, bool) + 0x1285 (0x7ff81a84ceb5 in /data/xmy/mmdet_new/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #2: + 0x26fed (0x7ff81a85cfed in /data/xmy/mmdet_new/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #3: + 0x2722e (0x7ff81a85d22e in /data/xmy/mmdet_new/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #4: + 0x22f9c (0x7ff81a858f9c in /data/xmy/mmdet_new/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so)
.......
The text was updated successfully, but these errors were encountered: