Skip to content
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

RuntimeError: Not implemented on the CPU #67

Open
ChenJian7578 opened this issue Jul 18, 2024 · 1 comment
Open

RuntimeError: Not implemented on the CPU #67

ChenJian7578 opened this issue Jul 18, 2024 · 1 comment

Comments

@ChenJian7578
Copy link

Traceback (most recent call last):
File "train.py", line 986, in
main(opt)
File "train.py", line 688, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 216, in train
model = Model(cfg or ckpt["model"].yaml, ch=3, nc=nc, anchors=hyp.get("anchors")).to(device) # create
File "/home/data/chenjian/yolov5/models/yolo.py", line 253, in init
m.stride = torch.tensor([s / x.shape[-2] for x in _forward(torch.zeros(1, ch, s, s))]) # forward
File "/home/data/chenjian/yolov5/models/yolo.py", line 249, in _forward
return self.forward(x)[0] if isinstance(m, Segment) else self.forward(x)
File "/home/data/chenjian/yolov5/models/yolo.py", line 268, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/home/data/chenjian/yolov5/models/yolo.py", line 168, in _forward_once
x = m(x) # run
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/home/data/chenjian/yolov5/models/common.py", line 115, in forward
x = self.dcnv4(x, shape)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/home/data/chenjian/yolov5/DCNv4_op/DCNv4/modules/dcnv4.py", line 130, in forward
x = DCNv4Function.apply(
File "/usr/local/lib/python3.8/dist-packages/torch/cuda/amp/autocast_mode.py", line 97, in decorate_fwd
return fwd(*args, **kwargs)
File "/home/data/chenjian/yolov5/DCNv4_op/DCNv4/functions/dcnv4_func.py", line 103, in forward
output = ext.dcnv4_forward(*args)
RuntimeError: Not implemented on the CPU

@Chris2wzk
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants