LiWentomng / OrientedRepPoints

The code for “Oriented RepPoints for Aerial Object Detection (CVPR 2022)”
272 stars 43 forks source link

训练报错 #12

Open youchen2020 opened 2 years ago

youchen2020 commented 2 years ago

File "/home/chenguhua/compete/OrientedRepPoints/mmdet/ops/dcn/deform_conv.py", line 87, in backward deform_conv_cuda.deform_conv_backward_parameters_cuda( RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

作者您好,您遇到过这个问题么?请问怎么解决呢? 多有打扰,敬请谅解,谢谢您。

LiWentomng commented 2 years ago

你好, 这个问题解决了吗?感觉还是环境配置的问题,以及编译过程中是否正常。 目前版本的代码运行环境为 pytorch==1.3.1,mmdet==1.1.0, mmcv==0.3.1.

ZhouHuang23 commented 2 years ago

您好,我在训练中也遇到同样的问题,请问有没有解决办法呢?原题主解决了吗? File "/home/hhh/proj/OrientedRepPoints/mmdet/ops/dcn/deform_conv.py", line 87, in backward deform_conv_cuda.deform_conv_backward_parameters_cuda( RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

ZhouHuang23 commented 2 years ago

我找到解决方法了,执行: sed -i 's/view/reshape/g' mmdet/ops/dcn/src/deform_conv_cuda.cpp 再重新编译(python setup.py develop)即可。

hugefrog commented 2 years ago

我找到解决方法了,执行: sed -i 's/view/reshape/g' mmdet/ops/dcn/src/deform_conv_cuda.cpp 再重新编译(python setup.py develop)即可。

兄弟,牛逼,按照你的方法不报错了。

ShawJoey commented 2 years ago

我找到解决方法了,执行: sed -i 's/view/reshape/g' mmdet/ops/dcn/src/deform_conv_cuda.cpp 再重新编译(python setup.py develop)即可。

it works, thanx!!! :)