InternImage icon indicating copy to clipboard operation
InternImage copied to clipboard

RuntimeError: Not implemented on the CPU

Open SkyPoet opened this issue 2 years ago • 4 comments

Traceback (most recent call last): File "train.py", line 616, in train(hyp, opt, device, tb_writer) File "train.py", line 95, in train model = Model(opt.cfg, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create File "/media/kb541/ruanpuchao/yolov7_train/models/yolo.py", line 717, in init m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward File "/media/kb541/ruanpuchao/yolov7_train/models/yolo.py", line 774, in forward return self.forward_once(x, profile) # single-scale inference, train File "/media/kb541/ruanpuchao/yolov7_train/models/yolo.py", line 800, in forward_once x = m(x) # run File "/home/undergraduate/anaconda3/envs/yolov7p/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/media/kb541/ruanpuchao/yolov7_train/models/common.py", line 2037, in forward x = self.dcnv3(x) File "/home/undergraduate/anaconda3/envs/yolov7p/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/media/kb541/ruanpuchao/yolov7_train/models/ops_dcnv3/modules/dcnv3.py", line 125, in forward x = DCNv3Function.apply( File "/home/undergraduate/anaconda3/envs/yolov7p/lib/python3.8/site-packages/torch/cuda/amp/autocast_mode.py", line 110, in decorate_fwd return fwd(*args, **kwargs) File "/media/kb541/ruanpuchao/yolov7_train/models/ops_dcnv3/functions/dcnv3_func.py", line 39, in forward output = DCNv3.dcnv3_forward( RuntimeError: Not implemented on the CPU

Does anyone know what the reason for this error is? I would appreciate it if you help me solve this issue.

SkyPoet avatar Apr 14 '23 11:04 SkyPoet

You can change core_op='DCNv3' to core_op='DCNv3_pytorch' in the config to support CPU.

czczup avatar Apr 14 '23 15:04 czczup

do you hava solved this error?

JJKeepMoving avatar Jun 07 '23 13:06 JJKeepMoving

Have you solved the problem? I have also encountered a similar problem, and I hope to get your clarification. 请问您解决这个问题了吗?我也遇到了类似的问题,希望得到您的解惑。

Object-Detection-01 avatar Aug 10 '23 03:08 Object-Detection-01

do you hava solved this error?

LTHMine avatar Oct 09 '23 06:10 LTHMine