Closed SkyPoet closed 1 year ago
已解决
你好,我也遇到了,你是怎么解决的呢?
原因是dcnv3只能在gpu运行,解决办法是把运行模型的的地方都加上 .to(torch.device('cuda'))或者其它可以使模型在gpu上运行的代码就可以了
---原始邮件--- 发件人: @.> 发送时间: 2023年6月14日(周三) 上午9:25 收件人: @.>; 抄送: @.**@.>; 主题: Re: [z1069614715/objectdetection_script] yolov7+DCNv3 训练时报错:RuntimeError: Not implemented on the CPU (Issue #19)
你好,我也遇到了,你是怎么解决的呢?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
`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`
我按照视频将DCNv3添加到了yolov7网络中,但是当我开始训练的时候,程序报错RuntimeError: Not implemented on the CPU,我的命令行输入为:python track.py --device 0,1 --epoch 100 --batch_size 32,按理说不会再cpu上运行模型的啊,为什么报这个错误呢?谢谢。