cwq159 / PyTorch-Spiking-YOLOv3

A PyTorch implementation of Spiking-YOLOv3. Two branches are provided, based on two common PyTorch implementation of YOLOv3(ultralytics/yolov3 & eriklindernoren/PyTorch-YOLOv3), with support for Spiking-YOLOv3-Tiny at present.
GNU General Public License v3.0
207 stars 58 forks source link

Expected all tensors all tensors to be on the same devcice. #16

Open Yiiiike opened 3 years ago

Yiiiike commented 3 years ago

作者你好,我使用yolov3-tiny-ours.cfg训练第三方数据集的时候,出现了如下问题: “RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!” 但是全文中使用device的地方都是cuda:0

我的环境是: win10 cuda11.1 + torch1.8.1 python38

还请您能指点一二。非常感谢

Yiiiike commented 3 years ago

还有一点:我在使用yolov3-spp.cfg的时候,没有遇到这样的问题,能够很顺利的运行完整个流程

cwq159 commented 3 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

请使用PyTorch1.3尝试一下

                            cwq

                                ***@***.***

    签名由
    网易邮箱大师
    定制

On 05/24/2021 ***@***.***> wrote: 

作者你好,我使用yolov3-tiny-ours.cfg训练第三方数据集的时候,出现了如下问题:

“RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!”

但是全文中使用device的地方都是cuda:0

我的环境是:

win10

cuda11.1 + torch1.8.1

python38

还请您能指点一二。非常感谢

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Yiiiike commented 3 years ago

非常感谢您抽空回答我的问题,问题现在已经解决了。

// 我将环境换成了linux下python37+cuda100+torch1.3.1,没有再出现之前的问题

cwq159 commented 3 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

不客气,后面我会更新一版算法,即将支持pytorch1.7以上

                            cwq

                                ***@***.***

    签名由
    网易邮箱大师
    定制

On 05/25/2021 ***@***.***> wrote: 

非常感谢您抽空回答我的问题,问题现在已经解决了。

// 我将环境换成了linux下python37+cuda100+torch1.3.1,没有再出现之前的问题

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.