HuCaoFighting/Swin-Unet

Help debug! Thank you!

Txxxi opened this issue · 1 comments

Txxxi commented

merge config from ./configs/swin_tiny_patch4_window7_224_lite.yaml
SwinTransformerSys expand initial----depths:[2, 2, 6, 2];depths_decoder:[1, 2, 2, 2];drop_path_rate:0.2;num_classes:1
---final upsample expand_first---
Traceback (most recent call last):
File "train.py", line 93, in
net = ViT_seg(config, img_size=args.img_size, num_classes=args.num_classes).cuda()
File "/public/home/hpc204611063/.conda/envs/txxtorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 491, in cuda
return self._apply(lambda t: t.cuda(device))
File "/public/home/hpc204611063/.conda/envs/txxtorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/public/home/hpc204611063/.conda/envs/txxtorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)
File "/public/home/hpc204611063/.conda/envs/txxtorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 387, in _apply
module._apply(fn)

if torch.cuda.is_available() is equal to False it means that you dont have cuda available and you must install it. Otherwise you can avoid this problem changing cuda() to cpu() in train.py line 93