PyCIL icon indicating copy to clipboard operation
PyCIL copied to clipboard

When i run codes on GPU1, it seems that .cuda() will put data on default GPU and then bugs occurred.

Open JACK-Chen-2019 opened this issue 1 year ago • 1 comments

When i run codes on GPU1, it seems that .cuda() will put data on default GPU and then bugs occurred. File "/home/ubuntu/lzc/PyCIL/utils/inc_net.py", line 605, in forward fc_weight = torch.cat([self.old_fc.weight,torch.zeros((new_task_size,self.feature_dim-self.out_dim)).cuda()],dim=0)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument tensors in method wrapper_cat)

JACK-Chen-2019 avatar Sep 14 '23 08:09 JACK-Chen-2019

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

caoshuai888 avatar Sep 14 '23 08:09 caoshuai888

Thanks for informing us. The bug will be fixed in the upcoming version.

zhoudw-zdw avatar May 08 '24 04:05 zhoudw-zdw