JCruan519 / VM-UNet

(ARXIV24) This is the official code repository for "VM-UNet: Vision Mamba UNet for Medical Image Segmentation".
Apache License 2.0
519 stars 24 forks source link

一个报错 #2

Open XingLongH opened 9 months ago

XingLongH commented 9 months ago

作者,您好 请问,这个报错是可以怎么解决呢? 发生异常: 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.)

XingLongH commented 9 months ago

出现在vmamba.py里面的 微信截图_20240214105455

JCruan519 commented 9 months ago

@XingLongH Hello, perhaps you can refer to the content in this link to solve the problem: https://github.com/MzeroMiko/VMamba/issues/13

XingLongH commented 9 months ago

谢谢,已经解决了

zjc24 commented 8 months ago

@XingLongH 您好,我遇到了相同的问题,请问您是怎么解决的?感谢!