作者,您好
请问,这个报错是可以怎么解决呢?
发生异常: RuntimeError
Expected u.is_cuda() to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 402, in forward_corev0
out_y = self.selective_scan(
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 464, in forward
y1, y2, y3, y4 = self.forward_core(x)
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 492, in forward
x = input + self.drop_path(self.self_attention(self.ln_1(input)))
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 554, in forward
x = blk(x)
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 731, in forward_features
x = layer(x)
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 760, in forward
x, skip_list = self.forward_features(x)
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmunet.py", line 30, in forward
logits = self.vmunet(x)
File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmunet.py", line 85, in
x_list = net(x)
RuntimeError: Expected u.is_cuda() to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)
作者,您好 请问,这个报错是可以怎么解决呢? 发生异常: RuntimeError Expected u.is_cuda() to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 402, in forward_corev0 out_y = self.selective_scan( File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 464, in forward y1, y2, y3, y4 = self.forward_core(x) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 492, in forward x = input + self.drop_path(self.self_attention(self.ln_1(input))) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 554, in forward x = blk(x) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 731, in forward_features x = layer(x) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmamba.py", line 760, in forward x, skip_list = self.forward_features(x) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmunet.py", line 30, in forward logits = self.vmunet(x) File "/mnt/Disk1/VM-UNet-main/models/vmunet/vmunet.py", line 85, in
x_list = net(x)
RuntimeError: Expected u.is_cuda() to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)